]> git.saurik.com Git - wxWidgets.git/commitdiff
give the generic tree and list controls a DoGetBestSize
authorRobin Dunn <robin@alldunn.com>
Wed, 25 Aug 2004 22:22:37 +0000 (22:22 +0000)
committerRobin Dunn <robin@alldunn.com>
Wed, 25 Aug 2004 22:22:37 +0000 (22:22 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28910 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/generic/listctrl.h
include/wx/generic/treectlg.h
src/generic/listctrl.cpp
src/generic/treectlg.cpp
wxPython/contrib/gizmos/wxCode/include/wx/treelistctrl.h
wxPython/contrib/gizmos/wxCode/src/treelistctrl.cpp

index cd59781dfa6742934d980621ce5ac99bfff0a75b..6efe3d70acdfb31fa3fc552d2be54aaaf0b69dc5 100644 (file)
@@ -211,6 +211,8 @@ public:
     virtual bool ShouldInheritColours() const { return false; }
     virtual void SetFocus();
 
+    virtual wxSize DoGetBestSize() const;
+    
     // implementation
     // --------------
 
index cd3cc583f3b803224060928ffeb86557b0336182..2d1183ada06876e7842bf72c6c06b108cb362b6c 100644 (file)
@@ -391,6 +391,8 @@ public:
     void OnGetToolTip( wxTreeEvent &event );
     void OnInternalIdle( );
 
+    virtual wxSize DoGetBestSize() const;
+
     virtual wxVisualAttributes GetDefaultAttributes() const
     {
         return GetClassDefaultAttributes(GetWindowVariant());
index ee4d53272ecb00ffd9d8933144f532e8576c61bd..ac0ab03bb201e666f5edaeacefa091e1627fa998 100644 (file)
@@ -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
 // ----------------------------------------------------------------------------
index 61cfce6b525ebd54b0696729fd849e6c3b79c6e1..3d35e8dfa0981e0e74e59f7a05880725d5a6380b 100644 (file)
@@ -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
index d92dc7c3b927ae61e7895594cf89795d7af54285..3b30c4a380525f93431b65c9f66932bdc593b117 100644 (file)
@@ -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;
index 8070a23c1884db1e04d9d0afefe9100b4179cc82..2fbdd144000105e15ba2f3d7708dee109ede9ee5 100644 (file)
@@ -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);
+}