Added a examples of virtual size use for setting scrollbars
both 'manually' and via sizer layout to scroll sample. Tweaked it for various 2.4 idioms that have arisen since it was written. Replaced GenericScrolledWin's DoSetVirtualSize, it really is needed for everything to work for both the user and lib. Don't call it from default scrolledwindow OnSize handlers unless AutoLayout is enabled though, and use the larger of best and client size. Hopefully this will fix any earlier troubles this caused with M. Purged (many) stray tabs &co from sizer.cpp Changed DoGetBestSize to return wxDefaultSize when no useful best size can be determined. If GetBestSize is intended to return the minimum undistorted size a window can take, we must be able to discriminate between valid and 'best guess' sizes, else the best guess windows can only grow. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17776 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -69,6 +69,8 @@ public:
|
||||
// lay out the window and its children
|
||||
virtual bool Layout();
|
||||
|
||||
virtual void DoSetVirtualSize(int x, int y);
|
||||
|
||||
protected:
|
||||
// this is needed for wxEVT_PAINT processing hack described in
|
||||
// wxScrollHelperEvtHandler::ProcessEvent()
|
||||
|
Reference in New Issue
Block a user