Hi,
Hi,
> Hi Fabio,
> > Many people know that to determine the absolute position (relative to the
> > screen) of a window using the method getscreenposition. Unfortunately, this
> > method can not be used to determine the precise location of grid's cell.
> > I need to know the cell's location because I load a frame the time of
> > creation of CreateCellEditor.
> > there is some other solution to getscreenposition?
> > --
> > Fabio Spadaro
> What you probably want to do it this:
> 1) Bind your grid to EVT_MOTION like this:
> self.MyGrid.GetGridColLabelWindow().Bind(wx.EVT_MOTION,
> self.onMouseOver)
> 2) In the event handler, grab the mouse position using something like
> this:
> pos = event.GetX()
> 3) Use that information to know where to put your frame.
> -------------------
> Mike Driscoll
> Blog: http://blog.pythonlibrary.org
> --
> To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
> or visithttp://groups.google.com/group/wxPython-users?hl=en
But the mouse event is not the only possible event as you may also use
the key event ...
--
Fabio Spadaro
Well, you could bind to this instead:
self.myGrid.Bind(gridlib.EVT_GRID_EDITOR_CREATED, self.onCellEdit)
Then in the handler, get a handle on the control:
editor = event.GetControl()
and maybe this will work:
editor.GetScreenPosition()
I'm not sure though.
···
On Dec 16, 9:56 am, Fabio Spadaro <fabiolinos...@gmail.com> wrote:
2009/12/16 Mike Driscoll <kyoso...@gmail.com>
> On Dec 15, 4:05 pm, Fabio Spadaro <fabiolinos...@gmail.com> wrote:
-------------------
Mike Driscoll
Blog: http://blog.pythonlibrary.org