ReoGrid Forum

Fast and powerful .NET Spreadsheet Component

You are not logged in.

Announcement

This forum has been archived and no longer accepts new user registrations. Please report your questions, problems, and feedback to the issue page of ReoGrid on GitHub. Thank you for your cooperation.

https://github.com/unvell/ReoGrid/issues

#1 2016-02-29 09:45:37

KilkennyCat
Member
Registered: 2016-02-29
Posts: 6

Cell.AbsolutePosition to screen coordinate?

Good day!

When mouse any event on worksheet, i want get screen coordinate cursor.
Grid.OnMouse* - not worked.
Scrool.OffsetXY not help.

Enable Grid.OnMouse* events, please smile
Or add Scroll.Pos property...

Thank you!

Offline

#2 2016-03-01 02:51:07

Jingwood
Moderator
From: jing at reogrid.net
Registered: 2014-06-03
Posts: 615

Re: Cell.AbsolutePosition to screen coordinate?

Hi, you can use CellMouseDown, CellMouseUp, CellMouseMove, CellMouseEnter and CellMouseLeave, they are event from worksheet instance.

var sheet = grid.Worksheets[0];
sheet.CellMouseDown += ...

In this event handler, use the AbsolutePosition property to get cursor position.

For scroll-bars, try use control event WorksheetScrolled.

grid.WorksheetScrolled += ...

Offline

#3 2016-03-01 03:05:31

KilkennyCat
Member
Registered: 2016-02-29
Posts: 6

Re: Cell.AbsolutePosition to screen coordinate?

Oh.. i understend!
In grid.WorksheetScrolled event i must always increment variable...

public float deltaY;
...
Grid1.WorksheetScrolled += (s, e) => {
         deltaY += e.OffsetY;
};

Thank you!

But... if in the cell properties would be something like, Cells.RelativeGridScreenPos smile, this wonderful component would be more wonderful smile

Offline

#4 2016-03-02 02:01:07

Jingwood
Moderator
From: jing at reogrid.net
Registered: 2014-06-03
Posts: 615

Re: Cell.AbsolutePosition to screen coordinate?

OK, Thank you! We will consider to add such position properties for cell instance in future versions.

Offline

Board footer

Powered by FluxBB