Add wxScrollWindow::ShouldScrollToChildOnFocus() virtual hook
This method can be overridden to indicate that the scrolled window doesn't want its children to be scrolled into view when they're focused, which is the default behaviour. Also reuse this method for Mac-specific scrollbar workaround.
This commit is contained in:
@@ -581,6 +581,19 @@ public:
|
||||
*/
|
||||
virtual bool SendAutoScrollEvents(wxScrollWinEvent& event) const;
|
||||
|
||||
/**
|
||||
This method can be overridden in a derived class to prevent scrolling
|
||||
the child window into view automatically when it gets focus.
|
||||
|
||||
The default behaviour is to scroll this window to show its currently
|
||||
focused child automatically, to ensure that the user can interact with
|
||||
it. This is usually helpful, but can be undesirable for some windows,
|
||||
in which case this method can be overridden to return @false for them
|
||||
to prevent any scrolling from taking place when such windows get focus.
|
||||
|
||||
@since 3.1.3
|
||||
*/
|
||||
virtual bool ShouldScrollToChildOnFocus(wxWindow* child)
|
||||
|
||||
protected:
|
||||
/**
|
||||
|
Reference in New Issue
Block a user