views:

45

answers:

1

I have a wxTextCtrl with a vertical scrollbar. I need to capture scroll events from the text control's scrollbar. I have a handler for EVT_SCROLL but it only gets invoked on the Windows build. On wxGTK it does nothing. Is there any way to make this work?

A: 

No, EVT_SCROLL, like many other events, only works for wxWidgets windows and not the native ones.

You can use wxRichTextCtrl or wxStyledTextCtrl but you probably won't find any way to be notified about scrolling in the native GTK+ text widget.

VZ
I guess I could derive from wxRichTextCtrl instead of wxTextCtrl. Does wxRichTextCtrl derive from wxTextCtrl?
George Edison
No but they both derive from wxTextCtrlBase which defines their common interface.
VZ