[wxPython-users] EVT_STC_* events not reporting x, y locations?

Robin Dunn robin at alldunn.com
Thu Nov 1 17:05:06 PDT 2007


Rob McMullen wrote:
> I saw the EVT_STC_DOUBLECLICK event and thought it'd apply to
> something I'm needing.  However, the attached sample text and program
> shows that there's no useful info in the StyledTextEvent -- all the
> interesting stuff is zero (GetX, GetY, GetPosition, etc.)  The
> START_DRAG does seem to report a value for GetPosition but nothing for
> GetX, GetY, etc.
> 
> Are some of the EVT_STC events just stubs?  On msw the
> EVT_STC_DRAG_OVER is an exception in that it reports values for GetX
> and GetY.  I can't get the DRAG_OVER to register on gtk  Otherwise,
> I'm seeing the same on gtk and msw, 2.8.6.0 and 2.8.6.1.
> 
> Obviously, I can work around this to some extent using the regular
> mouse events, but it would be nice to take advantage of extra stuff
> the stc provides if it's capable.

Like all of the complex controls in wx, wxSTC doesn't always use all of 
the members of the event objects for all event types.  You can see which 
are set for which event types here:

http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/src/stc/stc.cpp?revision=47479&view=markup

Search for wxStyledTextCtrl::NotifyParent


-- 
Robin Dunn
Software Craftsman
http://wxPython.org  Java give you jitters?  Relax with wxPython!





More information about the wxpython-users mailing list