give the generic tree and list controls a DoGetBestSize
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28910 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -211,6 +211,8 @@ public:
|
||||
virtual bool ShouldInheritColours() const { return false; }
|
||||
virtual void SetFocus();
|
||||
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
// implementation
|
||||
// --------------
|
||||
|
||||
|
@@ -391,6 +391,8 @@ public:
|
||||
void OnGetToolTip( wxTreeEvent &event );
|
||||
void OnInternalIdle( );
|
||||
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
virtual wxVisualAttributes GetDefaultAttributes() const
|
||||
{
|
||||
return GetClassDefaultAttributes(GetWindowVariant());
|
||||
|
@@ -5351,6 +5351,14 @@ void wxGenericListCtrl::SetFocus()
|
||||
m_mainWin->SetFocus();
|
||||
}
|
||||
|
||||
wxSize wxGenericListCtrl::DoGetBestSize() const
|
||||
{
|
||||
// Something is better than nothing...
|
||||
// 100x80 is what the MSW version will get from the default
|
||||
// wxControl::DoGetBestSize
|
||||
return wxSize(100,80);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// virtual list control support
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -3476,6 +3476,15 @@ void wxGenericTreeCtrl::OnGetToolTip( wxTreeEvent &event )
|
||||
}
|
||||
|
||||
|
||||
wxSize wxGenericTreeCtrl::DoGetBestSize() const
|
||||
{
|
||||
// something is better than nothing...
|
||||
// 100x80 is what the MSW version will get from the default
|
||||
// wxControl::DoGetBestSize
|
||||
return wxSize(100,80);
|
||||
}
|
||||
|
||||
|
||||
// NOTE: If using the wxListBox visual attributes works everywhere then this can
|
||||
// be removed, as well as the #else case below.
|
||||
#define _USE_VISATTR 0
|
||||
|
@@ -530,6 +530,8 @@ public:
|
||||
wxTreeListMainWindow* GetMainWindow() const
|
||||
{ return m_main_win; }
|
||||
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
protected:
|
||||
// header window, responsible for column visualization and manipulation
|
||||
wxTreeListHeaderWindow* m_header_win;
|
||||
|
@@ -5005,3 +5005,9 @@ void wxTreeListCtrl::Refresh(bool erase, const wxRect* rect)
|
||||
void wxTreeListCtrl::SetFocus()
|
||||
{ m_main_win->SetFocus(); }
|
||||
|
||||
|
||||
wxSize wxTreeListCtrl::DoGetBestSize() const
|
||||
{
|
||||
// something is better than nothing...
|
||||
return wxSize(100,80);
|
||||
}
|
||||
|
Reference in New Issue
Block a user