]> git.saurik.com Git - wxWidgets.git/commitdiff
GetBestFittingSize --> GetEffectiveMinSize
authorRobin Dunn <robin@alldunn.com>
Tue, 31 Oct 2006 08:50:17 +0000 (08:50 +0000)
committerRobin Dunn <robin@alldunn.com>
Tue, 31 Oct 2006 08:50:17 +0000 (08:50 +0000)
SetBestFittingSize --> SetInitialSize
SetBestSize  --> SetInitialSize
SetInitialBestSize --> SetInitialSize

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42816 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

103 files changed:
contrib/src/gizmos/statpict.cpp
contrib/src/stc/stc.cpp
contrib/src/stc/stc.cpp.in
demos/forty/scoredg.cpp
docs/changes.txt
docs/latex/wx/window.tex
include/wx/bookctrl.h
include/wx/control.h
include/wx/ctrlsub.h
include/wx/msw/radiobox.h
include/wx/palmos/radiobox.h
include/wx/window.h
src/common/mediactrlcmn.cpp
src/common/sizer.cpp
src/common/wincmn.cpp
src/generic/buttonbar.cpp
src/generic/calctrl.cpp
src/generic/choicbkg.cpp
src/generic/collpaneg.cpp
src/generic/combog.cpp
src/generic/datectlg.cpp
src/generic/grid.cpp
src/generic/hyperlink.cpp
src/generic/listctrl.cpp
src/generic/spinctlg.cpp
src/generic/splitter.cpp
src/generic/treectlg.cpp
src/gtk/animate.cpp
src/gtk/choice.cpp
src/gtk/clrpicker.cpp
src/gtk/combobox.cpp
src/gtk/control.cpp
src/gtk/filepicker.cpp
src/gtk/fontpicker.cpp
src/gtk/gauge.cpp
src/gtk/listbox.cpp
src/gtk1/choice.cpp
src/gtk1/combobox.cpp
src/gtk1/control.cpp
src/gtk1/gauge.cpp
src/gtk1/listbox.cpp
src/mac/carbon/checklst.cpp
src/mac/carbon/choice.cpp
src/mac/carbon/combobox.cpp
src/mac/carbon/combobxc.cpp
src/mac/carbon/listbox.cpp
src/mac/carbon/spinctrl.cpp
src/mac/carbon/statbmp.cpp
src/mac/carbon/toolbar.cpp
src/mac/carbon/window.cpp
src/mac/classic/statbmp.cpp
src/mac/classic/stattext.cpp
src/msw/bmpbuttn.cpp
src/msw/choice.cpp
src/msw/combo.cpp
src/msw/control.cpp
src/msw/listbox.cpp
src/msw/radiobox.cpp
src/msw/spinbutt.cpp
src/msw/spinctrl.cpp
src/msw/statbmp.cpp
src/msw/wince/checklst.cpp
src/msw/wince/choicece.cpp
src/msw/wince/textctrlce.cpp
src/os2/choice.cpp
src/os2/combobox.cpp
src/palmos/control.cpp
src/palmos/slider.cpp
src/richtext/richtextctrl.cpp
src/richtext/richtextstyles.cpp
src/stc/stc.cpp
src/stc/stc.cpp.in
src/univ/button.cpp
src/univ/checkbox.cpp
src/univ/gauge.cpp
src/univ/listbox.cpp
src/univ/notebook.cpp
src/univ/scrolbar.cpp
src/univ/slider.cpp
src/univ/spinbutt.cpp
src/univ/statbmp.cpp
src/univ/stattext.cpp
src/univ/textctrl.cpp
src/univ/toolbar.cpp
wxPython/demo/CustomTreeCtrl.py
wxPython/demo/GenericButtons.py
wxPython/demo/MediaCtrl.py
wxPython/misc/drawwidget.py
wxPython/misc/widgetLayoutTest.py
wxPython/src/_pycontrol.i
wxPython/src/_pywindows.i
wxPython/src/_window.i
wxPython/wx/lib/analogclock/analogclock.py
wxPython/wx/lib/buttonpanel.py
wxPython/wx/lib/buttons.py
wxPython/wx/lib/masked/combobox.py
wxPython/wx/lib/masked/maskededit.py
wxPython/wx/lib/masked/textctrl.py
wxPython/wx/lib/scrolledpanel.py
wxPython/wx/lib/splitter.py
wxPython/wx/lib/statbmp.py
wxPython/wx/lib/stattext.py
wxPython/wx/lib/ticker.py

index a6fd9f768eaec819706f88adddd6f2a59bd21076..b8c1cdf99d03fda4244a8c22d857ed7f396eee73 100644 (file)
@@ -67,7 +67,7 @@ bool wxStaticPicture::Create(wxWindow *parent, wxWindowID id,
 
     bool ret = wxControl::Create( parent, id, pos, size, style, wxDefaultValidator, name );
 
-    SetBestSize( size ) ;
+    SetInitialSize( size ) ;
 
     return ret;
 }
index bc54bf966ca796c45430a192f3600b658e851c75..0bf46f60b46edcf52e0a3496ba3160bab7230ae7 100644 (file)
@@ -179,7 +179,7 @@ bool wxStyledTextCtrl::Create(wxWindow *parent,
     SetCodePage(wxSTC_CP_UTF8);
 #endif
 
-    SetBestFittingSize(size);
+    SetInitialSize(size);
 
     // Reduces flicker on GTK+/X11
     SetBackgroundStyle(wxBG_STYLE_CUSTOM);
index 2a9806a68a2adf03772aea3010017a41e22ce928..d1a1701a532f913fcb6cf939b0f64e5a19353eca 100644 (file)
@@ -179,7 +179,7 @@ bool wxStyledTextCtrl::Create(wxWindow *parent,
     SetCodePage(wxSTC_CP_UTF8);
 #endif
 
-    SetBestFittingSize(size);
+    SetInitialSize(size);
 
     // Reduces flicker on GTK+/X11
     SetBackgroundStyle(wxBG_STYLE_CUSTOM);
index d8344f3eb0fe913844d8ab09d15fa9c49b218db6..ecd1bb44f4dde5b848d3e89117d65a1e6902f882 100644 (file)
@@ -181,7 +181,7 @@ ScoreDialog::ScoreDialog(wxWindow* parent, ScoreFile* file) :
     ScoreCanvas* list = new ScoreCanvas(this, m_scoreFile, wxDefaultPosition, sz);
 #endif
 
-    list->SetBestFittingSize(sz);
+    list->SetInitialSize(sz);
 
     // locate and resize with sizers
     wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );
index 4d19f0f087b45bdf88a99e3b4689debdd582defc..3401fd256dd8c62676fb6c10532d1c0e30e2c723 100644 (file)
@@ -64,6 +64,9 @@ Deprecated methods since 2.6.x and their replacements
 
 - wxGetWorkingDirectory() deprecated in favour of wxGetCwd().
 - wxDC::BeginDrawing() and wxDC::EndDrawing() deprecated, don't use them.
+- wxWindowBase::GetBestFittingSize --> wxWindowBase::GetEffectiveMinSize
+- wxWindowBase::SetBestFittingSize --> wxWindowBase::SetInitialSize
+
 
 
 Major new features in 2.7 release
index 438768873c8a08dda5d91822ba8611b609513b93..ea2e152a50857a258b45fe7d390e88d9541d265a 100644 (file)
@@ -758,16 +758,18 @@ background, such as a tiled bitmap. Currently the style has no effect on other p
 \helpref{wxWindow::GetForegroundColour}{wxwindowgetforegroundcolour},\rtfsp
 \helpref{wxWindow::SetBackgroundStyle}{wxwindowsetbackgroundstyle}
 
-\membersection{wxWindow::GetBestFittingSize}\label{wxwindowgetbestfittingsize}
+\membersection{wxWindow::GetEffectiveMinSize}\label{wxwindowgeteffectiveminsize}
 
-\constfunc{wxSize}{GetBestFittingSize}{\void}
+\constfunc{wxSize}{GetEffectiveMinSize}{\void}
 
-Merges the window's best size into the min size and returns the result.
+Merges the window's best size into the min size and returns the
+result.  This is the value used by sizers to determine the appropriate
+ammount of sapce to allocate for the widget.
 
 \wxheading{See also}
 
 \helpref{wxWindow::GetBestSize}{wxwindowgetbestsize},\rtfsp
-\helpref{wxWindow::SetBestFittingSize}{wxwindowsetbestfittingsize}
+\helpref{wxWindow::SetInitialSize}{wxwindowsetinitialsize}
 
 
 \membersection{wxWindow::GetBestSize}\label{wxwindowgetbestsize}
@@ -2661,9 +2663,9 @@ background, such as a tiled bitmap. Currently the style has no effect on other p
 \helpref{wxWindow::GetBackgroundStyle}{wxwindowgetbackgroundstyle}
 
 
-\membersection{wxWindow::SetBestFittingSize}\label{wxwindowsetbestfittingsize}
+\membersection{wxWindow::SetInitialSize}\label{wxwindowsetinitialsize}
 
-\func{void}{SetBestFittingSize}{\param{const wxSize\& }{size = wxDefaultSize}}
+\func{void}{SetInitialSize}{\param{const wxSize\& }{size = wxDefaultSize}}
 
 A {\it smart} SetSize that will fill in default size components with the
 window's {\it best} size values.  Also sets the window's minsize to
@@ -2672,11 +2674,15 @@ partial size is passed to this function then the sizers will use that
 size instead of the results of GetBestSize to determine the minimum
 needs of the window for layout.
 
+Most controls will use this to set their initial size, and their min
+size to the passed in value (if any.)
+
+
 \wxheading{See also}
 
 \helpref{wxWindow::SetSize}{wxwindowsetsize},\rtfsp
 \helpref{wxWindow::GetBestSize}{wxwindowgetbestsize},\rtfsp
-\helpref{wxWindow::GetBestFittingSize}{wxwindowgetbestfittingsize}
+\helpref{wxWindow::GetEffectiveMinSize}{wxwindowgeteffectiveminsize}
 
 
 \membersection{wxWindow::SetCaret}\label{wxwindowsetcaret}
index 454e99545a46e3128c2953ffd1cf50bdfcc16507..33599c7a41570641eae45cd114d60a49fe4a11da 100644 (file)
@@ -276,9 +276,6 @@ protected:
     // helper: get the next page wrapping if we reached the end
     int GetNextPage(bool forward) const;
 
-    // Always rely on GetBestSize, which will look at all the pages
-    virtual void SetInitialBestSize(const wxSize& WXUNUSED(size)) { }
-
     // Lay out controls
     void DoSize();
 
index aed113f80304f5032dd4e4d1c3bbe4ecca845022..560a476e05d3ea0d49164c9a5ffedacbe1c14886 100644 (file)
@@ -84,17 +84,6 @@ protected:
     // initialize the common fields of wxCommandEvent
     void InitCommandEvent(wxCommandEvent& event) const;
 
-    // set the initial window size if none is given (i.e. at least one of the
-    // components of the size passed to ctor/Create() is -1)
-    //
-    // normally just calls SetBestSize() but can be overridden not to do it for
-    // the controls which have to do some additional initialization (e.g. add
-    // strings to list box) before their best size can be accurately calculated
-    virtual void SetInitialBestSize(const wxSize& size)
-    {
-        SetBestSize(size);
-    }
-
     DECLARE_NO_COPY_CLASS(wxControlBase)
 };
 
index 308fb6a03ad9c442e4926bebfde78ec7a9b1a742..9939f9a7df0acc471b4b5f5787af21f67eddc0ae 100644 (file)
@@ -189,15 +189,6 @@ public:
     virtual bool ShouldInheritColours() const { return false; }
 
 protected:
-    // we can't compute our best size before the items are added to the control
-    // which is done after calling SetInitialBestSize() (it is called from the
-    // base class ctor and the items are added in the derived class ctor), so
-    // don't do anything at all here as our size will be changed later anyhow
-    //
-    // of course, all derived classes *must* call SetBestSize() from their
-    // ctors for this to work!
-    virtual void SetInitialBestSize(const wxSize& WXUNUSED(size)) { }
-
     // fill in the client object or data field of the event as appropriate
     //
     // calls InitCommandEvent() and, if n != wxNOT_FOUND, also sets the per
index 60f29cb922cdc61e8a86cf7a746638ef2ad106a0..a301eba1720940639ba823d27b93109f5ecdbb1b 100644 (file)
@@ -123,9 +123,6 @@ protected:
     // common part of all ctors
     void Init();
 
-    // we can't compute our best size before the items are added to the control
-    virtual void SetInitialBestSize(const wxSize& WXUNUSED(size)) { }
-
     // subclass one radio button
     void SubclassRadioButton(WXHWND hWndBtn);
 
index fc8d8721d9d30416710ff73910715e3fbf15df78..a018e6e6698fd64db42b264e58179a0f011506df 100644 (file)
@@ -139,9 +139,6 @@ public:
     void SendNotificationEvent();
 
 protected:
-    // we can't compute our best size before the items are added to the control
-    virtual void SetInitialBestSize(const wxSize& WXUNUSED(size)) { }
-
     // get the max size of radio buttons
     wxSize GetMaxButtonSize() const;
 
index e15b3291d4e33a891cf3a4c4b1f44907e86f7a7a..3d39594bc41554c7b11c7b05ac9e609ef26771fb 100644 (file)
@@ -357,12 +357,15 @@ public:
         // This function will merge the window's best size into the window's
         // minimum size, giving priority to the min size components, and
         // returns the results.
-    wxSize GetBestFittingSize() const;
+    wxSize GetEffectiveMinSize() const;
+    wxDEPRECATED( wxSize GetBestFittingSize() const );  // replaced by GetEffectiveMinSize
 
         // A 'Smart' SetSize that will fill in default size values with 'best'
         // size.  Sets the minsize to what was passed in.
-    void SetBestFittingSize(const wxSize& size=wxDefaultSize);
+    void SetInitialSize(const wxSize& size=wxDefaultSize);
+    wxDEPRECATED( void SetBestFittingSize(const wxSize& size=wxDefaultSize) );  // replaced by SetInitialSize
 
+    
         // the generic centre function - centers the window on parent by`
         // default or on screen if it doesn't have parent or
         // wxCENTER_ON_SCREEN flag is given
@@ -1275,18 +1278,8 @@ protected:
     // recalculated each time the value is needed.
     wxSize m_bestSizeCache;
 
-    // keep the old name for compatibility, at least until all the internal
-    // usages of it are changed to SetBestFittingSize
-    void SetBestSize(const wxSize& size) { SetBestFittingSize(size); }
-
-    // set the initial window size if none is given (i.e. at least one of the
-    // components of the size passed to ctor/Create() is wxDefaultCoord)
-    //
-    // normally just calls SetBestSize() for controls, but can be overridden
-    // not to do it for the controls which have to do some additional
-    // initialization (e.g. add strings to list box) before their best size
-    // can be accurately calculated
-    virtual void SetInitialBestSize(const wxSize& WXUNUSED(size)) {}
+    wxDEPRECATED( void SetBestSize(const wxSize& size) );  // use SetInitialSize
+    wxDEPRECATED( virtual void SetInitialBestSize(const wxSize& size) );  // use SetInitialSize
 
 
 
@@ -1393,6 +1386,30 @@ private:
     DECLARE_EVENT_TABLE()
 };
 
+
+
+// Inlines for some deprecated methods
+inline wxSize wxWindowBase::GetBestFittingSize() const
+{
+    return GetEffectiveMinSize();
+}
+
+inline void wxWindowBase::SetBestFittingSize(const wxSize& size)
+{
+    SetInitialSize(size);
+}
+
+inline void wxWindowBase::SetBestSize(const wxSize& size)
+{
+    SetInitialSize(size);
+}
+
+inline void wxWindowBase::SetInitialBestSize(const wxSize& size)
+{
+    SetInitialSize(size);
+}
+
+
 // ----------------------------------------------------------------------------
 // now include the declaration of wxWindow class
 // ----------------------------------------------------------------------------
index 2563d85a8f3e69ba1ebdb0ff91827c255befa22a..b0d93db7af568972e499f9115b370fb8bc05686d 100644 (file)
@@ -115,7 +115,7 @@ bool wxMediaCtrl::Create(wxWindow* parent, wxWindowID id,
             }
         }
 
-        SetBestFittingSize(size);
+        SetInitialSize(size);
         return true;
     }
     else
@@ -134,7 +134,7 @@ bool wxMediaCtrl::Create(wxWindow* parent, wxWindowID id,
             {
                 if (Load(fileName))
                 {
-                    SetBestFittingSize(size);
+                    SetInitialSize(size);
                     return true;
                 }
                 else
@@ -142,7 +142,7 @@ bool wxMediaCtrl::Create(wxWindow* parent, wxWindowID id,
             }
             else
             {
-                SetBestFittingSize(size);
+                SetInitialSize(size);
                 return true;
             }
         }
@@ -178,7 +178,7 @@ bool wxMediaCtrl::Create(wxWindow* parent, wxWindowID id,
             return false;
         }
 
-        SetBestFittingSize(size);
+        SetInitialSize(size);
         return true;
     }
     else
@@ -195,7 +195,7 @@ bool wxMediaCtrl::Create(wxWindow* parent, wxWindowID id,
 
             if (Load(location))
             {
-                SetBestFittingSize(size);
+                SetInitialSize(size);
                 return true;
             }
             else
index a691f6431c5af175f8741d922e325819d515c421..3429e7b01f2205751fd54b25bba9f55a55536029 100644 (file)
@@ -276,7 +276,7 @@ wxSize wxSizerItem::CalcMin()
     {
         // Since the size of the window may change during runtime, we
         // should use the current minimal/best size.
-        m_minSize = m_window->GetBestFittingSize();
+        m_minSize = m_window->GetEffectiveMinSize();
     }
 
     return GetMinSizeWithBorder();
index 3dc6813f7b86298eebfafe8bfa2806aaa75c0d16..e37d4f0897bd9473e87e2b1c8c5b047c0c48de16 100644 (file)
@@ -580,7 +580,7 @@ wxSize wxWindowBase::DoGetBestSize() const
 }
 
 
-wxSize wxWindowBase::GetBestFittingSize() const
+wxSize wxWindowBase::GetEffectiveMinSize() const
 {
     // merge the best size with the min size, giving priority to the min size
     wxSize min = GetMinSize();
@@ -594,14 +594,14 @@ wxSize wxWindowBase::GetBestFittingSize() const
 }
 
 
-void wxWindowBase::SetBestFittingSize(const wxSize& size)
+void wxWindowBase::SetInitialSize(const wxSize& size)
 {
     // Set the min size to the size passed in.  This will usually either be
     // wxDefaultSize or the size passed to this window's ctor/Create function.
     SetMinSize(size);
 
     // Merge the size with the best size if needed
-    wxSize best = GetBestFittingSize();
+    wxSize best = GetEffectiveMinSize();
 
     // If the current size doesn't match then change it
     if (GetSize() != best)
index e56e4ddce29cca089e41e30e70449d2a6377aade..343e7e585a91e1f955f48c53ad80f37f8df15a8b 100644 (file)
@@ -351,7 +351,7 @@ bool wxButtonToolBar::Realize()
     m_needsLayout = true;
     DoLayout();
 
-    SetBestSize(wxSize(m_maxWidth, m_maxHeight));
+    SetInitialSize(wxSize(m_maxWidth, m_maxHeight));
 
     return true;
 }
index 59b083f668fdcbed7937fa04856b7e4e40c427b8..7648d8917e66406d708cfa6a3c0cc4218023520c 100644 (file)
@@ -235,7 +235,7 @@ bool wxCalendarCtrl::Create(wxWindow *parent,
     // we need to set the position as well because the main control position
     // is not the same as the one specified in pos if we have the controls
     // above it
-    SetBestSize(size);
+    SetInitialSize(size);
     SetPosition(pos);
 
     // Since we don't paint the whole background make sure that the platform
@@ -790,7 +790,7 @@ void wxCalendarCtrl::DoMoveWindow(int x, int y, int width, int height)
 
     if ( !HasFlag(wxCAL_SEQUENTIAL_MONTH_SELECTION) && m_staticMonth )
     {
-        wxSize sizeCombo = m_comboMonth->GetBestFittingSize();
+        wxSize sizeCombo = m_comboMonth->GetEffectiveMinSize();
         wxSize sizeStatic = m_staticMonth->GetSize();
         wxSize sizeSpin = m_spinYear->GetSize();
 
index 7216b152bc115a61d9ef755edcea1c6adbd397e5..096d5e4d2fcf17f229e8ba2eaf831da00eb83bca 100644 (file)
@@ -122,7 +122,6 @@ wxChoicebook::Create(wxWindow *parent,
 wxSize wxChoicebook::GetControllerSize() const
 {
     const wxSize sizeClient = GetClientSize(),
-                 // sizeChoice = m_bookctrl->GetBestFittingSize();
                  sizeChoice = m_controlSizer->CalcMin();
 
     wxSize size;
index aaf84e42988a79caafb712f183e6d63f9fad5429..ad017b317f283d69f5644b501ad2dc29f966b648 100644 (file)
@@ -218,7 +218,7 @@ void wxGenericCollapsiblePane::SetLabel(const wxString &label)
 {
     m_strLabel = label;
     m_pButton->SetLabel(GetBtnLabel());
-    m_pButton->SetBestFittingSize();
+    m_pButton->SetInitialSize();
 
     Layout();
 }
index 0987c8a8567a67187ae027cc96455ea8632bdaaa..082612d098856480d0f69a5dcaebdcc48fd4fff0 100644 (file)
@@ -187,8 +187,8 @@ bool wxGenericComboCtrl::Create(wxWindow *parent,
     // Set background
     SetBackgroundStyle( wxBG_STYLE_CUSTOM ); // for double-buffering
 
-    // SetBestSize should be called last
-    SetBestSize(size);
+    // SetInitialSize should be called last
+    SetInitialSize(size);
 
     return true;
 }
index 7648284451e3f69aaed31bdde8430cd00d3be375..fbdbdb8bb6503a5257b0896dab42668275f6d665 100644 (file)
@@ -419,7 +419,7 @@ bool wxDatePickerCtrlGeneric::Create(wxWindow *parent,
 
     m_popup->SetDateValue(date.IsValid() ? date : wxDateTime::Today());
 
-    SetBestFittingSize(size);
+    SetInitialSize(size);
 
     return true;
 }
index a2994e167915ceb41b0d8827e908f7bc01a8426c..8f8d30f9756e15f75e659424782d172550c45bb9 100644 (file)
@@ -4163,7 +4163,7 @@ wxGrid::wxGrid( wxWindow *parent,
     m_rowMinHeights(GRID_HASH_SIZE)
 {
     Create();
-    SetBestFittingSize(size);
+    SetInitialSize(size);
 }
 
 bool wxGrid::Create(wxWindow *parent, wxWindowID id,
@@ -4178,7 +4178,7 @@ bool wxGrid::Create(wxWindow *parent, wxWindowID id,
     m_rowMinHeights = wxLongToLongHashMap(GRID_HASH_SIZE);
 
     Create();
-    SetBestFittingSize(size);
+    SetInitialSize(size);
 
     return true;
 }
index de7a4336ddcec3c60238baaeda9712760546349c..21f80fc13135f1f2602ea1688640e30291a36d36 100644 (file)
@@ -115,7 +115,7 @@ bool wxHyperlinkCtrl::Create(wxWindow *parent, wxWindowID id,
     f.SetUnderlined(true);
     SetFont(f);
 
-    SetBestFittingSize(size);
+    SetInitialSize(size);
     
     return true;
 }
index d83f686fbfc7125044117896efe0dfbd79fd0c55..3ea1dcafb66c50c58a80455417c164279a299303 100644 (file)
@@ -4826,7 +4826,7 @@ bool wxGenericListCtrl::Create(wxWindow *parent,
             m_headerWin->Show( false );
     }
 
-    SetBestSize(size);
+    SetInitialSize(size);
 
     return true;
 }
index 409b708a0e16f40eef88eb4e9b4387d25f079cb6..88de174cfd1cbce078abe74707d9255c062756b9 100644 (file)
@@ -183,7 +183,7 @@ bool wxSpinCtrl::Create(wxWindow *parent,
 
     m_btn->SetRange(min, max);
     m_btn->SetValue(initial);
-    SetBestSize(size);
+    SetInitialSize(size);
     Move(pos);
 
     // have to disable this window to avoid interfering it with message
index a869918ae00b45db97a77e24bc506b54458de9ad..a8747b4652dcc967e926875ce8f63dca50147a1b 100644 (file)
@@ -884,9 +884,9 @@ wxSize wxSplitterWindow::DoGetBestSize() const
     // get best sizes of subwindows
     wxSize size1, size2;
     if ( m_windowOne )
-        size1 = m_windowOne->GetBestFittingSize();
+        size1 = m_windowOne->GetEffectiveMinSize();
     if ( m_windowTwo )
-        size2 = m_windowTwo->GetBestFittingSize();
+        size2 = m_windowTwo->GetEffectiveMinSize();
 
     // sum them
     //
index b0e71881b09f9b67e71b273bece4ef8df004c188..32498c50937bf35e4bb504edad39002de91fda6a 100644 (file)
@@ -865,7 +865,7 @@ bool wxGenericTreeCtrl::Create(wxWindow *parent,
 
     m_dottedPen = wxPen( wxT("grey"), 0, 0 );
 
-    SetBestSize(size);
+    SetInitialSize(size);
 
     return true;
 }
index e2c1333636f2035c8edf55c4f75a952700df616e..7b3b798c00ae796e492ca4d4122cb1bb44d8e93b 100644 (file)
@@ -211,7 +211,7 @@ bool wxAnimationCtrl::Create( wxWindow *parent, wxWindowID id,
     m_parent->DoAddChild( this );
 
     PostCreation(size);
-    SetBestSize(size);
+    SetInitialSize(size);
 
     if (anim.IsOk())
         SetAnimation(anim);
index 737522f7ada89e092399945b7e55b1d5aa8c5a39..02b6c41b2a617de22f10821042790c5e44819638 100644 (file)
@@ -133,7 +133,7 @@ bool wxChoice::Create( wxWindow *parent, wxWindowID id,
     m_parent->DoAddChild( this );
 
     PostCreation(size);
-    SetBestSize(size); // need this too because this is a wxControlWithItems
+    SetInitialSize(size); // need this too because this is a wxControlWithItems
 
     return true;
 }
index b88a8a37aa9659866698b302e0588c91e2fdae88..a8ed5ef927734835a2a8544a3b834ce197dd2c34 100644 (file)
@@ -83,7 +83,7 @@ bool wxColourButton::Create( wxWindow *parent, wxWindowID id,
         m_parent->DoAddChild( this );
 
         PostCreation(size);
-        SetBestSize(size);
+        SetInitialSize(size);
     }
     else
         return wxGenericColourButton::Create(parent, id, col, pos, size,
index 1f39a8f9ad47b04584e4301673327b793f88c562..936f383894f0b5d74be07367d6bf19a8f75b2031 100644 (file)
@@ -378,7 +378,7 @@ bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value,
 //        gtk_widget_set_size_request( m_widget, setsize.x, setsize.y );
     }
 
-    SetBestSize(size); // need this too because this is a wxControlWithItems
+    SetInitialSize(size); // need this too because this is a wxControlWithItems
 
 
     return true;
index 9641245f398431d6079e6773f10aad799b50936d..f940e07bdb355389915ca4ca2f7f9650669c9e8f 100644 (file)
@@ -82,7 +82,7 @@ void wxControl::PostCreation(const wxSize& size)
     gtk_widget_ensure_style(m_widget);
 
     ApplyWidgetStyle();
-    SetInitialBestSize(size);
+    SetInitialSize(size);
 }
 
 // ----------------------------------------------------------------------------
index cec62bdeb1333320800cf895ba9cbaa8189c0750..c79eb51426266ab58c1ede414a08360d0a82e0ab 100644 (file)
@@ -94,7 +94,7 @@ bool wxFileButton::Create( wxWindow *parent, wxWindowID id,
         m_parent->DoAddChild( this );
 
         PostCreation(size);
-        SetBestSize(size);
+        SetInitialSize(size);
     }
     else
         return wxGenericFileButton::Create(parent, id, label, path, message, wildcard,
@@ -241,7 +241,7 @@ bool wxDirButton::Create( wxWindow *parent, wxWindowID id,
         m_parent->DoAddChild( this );
 
         PostCreation(size);
-        SetBestSize(size);
+        SetInitialSize(size);
     }
     else
         return wxGenericDirButton::Create(parent, id, label, path, message, wildcard,
index 88e2b93c7c5da116e22bacfe521203bc9dd29f72..eda8022cc19a7c96f09b5f4854e5812a95a0c7af 100644 (file)
@@ -95,7 +95,7 @@ bool wxFontButton::Create( wxWindow *parent, wxWindowID id,
         m_parent->DoAddChild( this );
 
         PostCreation(size);
-        SetBestSize(size);
+        SetInitialSize(size);
     }
     else
         return wxGenericFontButton::Create(parent, id, initial, pos, size,
index e0b4b49010072b7797d7001f9e3a83d0b36bab21..7fb1828e14a54fa102b8218b6332e83085d11b91 100644 (file)
@@ -55,7 +55,7 @@ bool wxGauge::Create( wxWindow *parent,
     m_parent->DoAddChild( this );
 
     PostCreation(size);
-    SetBestSize(size);
+    SetInitialSize(size);
 
     return true;
 }
index 1085290fa26efd2fa42a7dc7732b33c48a6eabb2..a6ec6583647beaf0a500ec95fa39e7f5eefe4921 100644 (file)
@@ -465,7 +465,7 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
     m_parent->DoAddChild( this );
 
     PostCreation(size);
-    SetBestSize(size); // need this too because this is a wxControlWithItems
+    SetInitialSize(size); // need this too because this is a wxControlWithItems
 
     return true;
 }
index 1372a2398f68ad88e60674d6d74bea915134d057..9b03f45cfe92c6f9fce2d140be4d4f5ca378e2e6 100644 (file)
@@ -146,7 +146,7 @@ bool wxChoice::Create( wxWindow *parent, wxWindowID id,
     m_parent->DoAddChild( this );
 
     PostCreation(size);
-    SetBestSize(size); // need this too because this is a wxControlWithItems
+    SetInitialSize(size); // need this too because this is a wxControlWithItems
 
     return true;
 }
index ea3d169aac8c1d4876b86f98663f4288117c57d2..3e519a1bc0a9e15523b7714528052fdcee41e58f 100644 (file)
@@ -283,7 +283,7 @@ bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value,
     gtk_signal_connect_after( GTK_OBJECT(combo->list), "select-child",
       GTK_SIGNAL_FUNC(gtk_combo_select_child_callback), (gpointer)this );
 
-    SetBestSize(size); // need this too because this is a wxControlWithItems
+    SetInitialSize(size); // need this too because this is a wxControlWithItems
 
     // This is required for tool bar support
 //    wxSize setsize = GetSize();
index f0c279a7f0be6b8d8f20cc43c0fe7d9abd0b26a8..e41fdb9cbe662f0564c2c0208fc3948fc04a8beb 100644 (file)
@@ -83,7 +83,7 @@ void wxControl::PostCreation(const wxSize& size)
     gtk_widget_ensure_style(m_widget);
 
     ApplyWidgetStyle();
-    SetInitialBestSize(size);
+    SetInitialSize(size);
 }
 
 // ----------------------------------------------------------------------------
index f4f5e3196ca6c532df271002efa88996a2386ffc..a68d74215fdda2e530508050cf079d6a0a8fb5ec 100644 (file)
@@ -52,7 +52,7 @@ bool wxGauge::Create( wxWindow *parent,
     m_parent->DoAddChild( this );
 
     PostCreation(size);
-    SetBestSize(size);
+    SetInitialSize(size);
 
     return true;
 }
index ca9fb3016c39ab36b8d375114eed7b5bc34bfc9b..2cf833d0ace0b336c3001c94177d5478a0e61ecf 100644 (file)
@@ -558,7 +558,7 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
     m_parent->DoAddChild( this );
 
     PostCreation(size);
-    SetBestSize(size); // need this too because this is a wxControlWithItems
+    SetInitialSize(size); // need this too because this is a wxControlWithItems
 
     return true;
 }
index 351a59bf6b73c764534827d8822fa912f16105ab..0f87743287a258457100949b4ac22b0cd5624b71 100644 (file)
@@ -93,7 +93,7 @@ bool wxCheckListBox::Create(
     InsertItems( n , choices , 0 );
 
     // Needed because it is a wxControlWithItems
-    SetBestSize( size );
+    SetInitialSize( size );
 
     return true;
 }
index ff814d85612c467da7b0385e98fe893e58065bfc..677acc8cfe53c962bae60d1d0f2dccc5ac598189 100644 (file)
@@ -101,7 +101,7 @@ bool wxChoice::Create(wxWindow *parent,
         SetSelection( 0 );
 
     // Needed because it is a wxControlWithItems
-    SetBestSize( size );
+    SetInitialSize( size );
 
     return true;
 }
index f2c79697b6218e8d40c8026f63c4d1f4c0eee571..d3f6965aa7eb16343165c23a392f78265aa79e2d 100644 (file)
@@ -394,7 +394,7 @@ bool wxComboBox::Create(wxWindow *parent,
     }
 
     // Needed because it is a wxControlWithItems
-    SetBestSize(size);
+    SetInitialSize(size);
     SetStringSelection(value);
 
     return true;
index 0925ed43e876755b16d9d65e353716faad332bc6..9a63c93e7094571e1fa775542edc53d37cdcff4d 100644 (file)
@@ -420,7 +420,7 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
     {
         m_choice->DoAppend( choices[ i ] );
     }
-    SetBestSize(csize);   // Needed because it is a wxControlWithItems
+    SetInitialSize(csize);   // Needed because it is a wxControlWithItems
 #endif
 
     return true;
index 69027b539199a86cd91a20750845da56992241eb..1a50bd9dc7701a31f60924664e83f7475997a00b 100644 (file)
@@ -89,7 +89,7 @@ bool wxListBox::Create(
     InsertItems( n, choices, 0 );
 
    // Needed because it is a wxControlWithItems
-    SetBestSize( size );
+    SetInitialSize( size );
 
     return true;
 }
index a9c852b7a5f545edf91161e39d43fbe7b0a146f5..63b1a7c41c2a1b441b7682a9ee0f38dd0fe788e3 100644 (file)
@@ -256,7 +256,7 @@ bool wxSpinCtrl::Create(wxWindow *parent,
     //SetSize(csize);
 
     //MacPostControlCreate(pos, csize);
-    SetInitialBestSize(csize);
+    SetInitialSize(csize);
 
     return true;
 }
index 7aad88f18ad6ddf633e2f303836d72dc3bf2d6e4..8948b0c3e592be5bc9179870cae0d52323b5afde 100644 (file)
@@ -50,7 +50,7 @@ bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id,
     m_windowStyle = style;
 
     bool ret = wxControl::Create( parent, id, pos, size, style , wxDefaultValidator , name );
-    SetBestSize( size ) ;
+    SetInitialSize( size ) ;
 
     return ret;
 }
index d4382cc13772f9bd594b7a9f0b77b702e57d1bb1..997a557d1be91b5f64e7103b02cde8365dbfbbdd 100644 (file)
@@ -1240,7 +1240,7 @@ bool wxToolBar::Realize()
     InvalidateBestSize();
 #endif
 
-    SetBestFittingSize();
+    SetInitialSize();
 
     return true;
 }
index 5cb844f3c0d3ab752c895d9743854638d46b0b6f..f4e4f26dbd84d90318dcf222a8e67b32830519d9 100644 (file)
@@ -1095,7 +1095,7 @@ void wxWindowMac::MacPostControlCreate(const wxPoint& pos, const wxSize& size)
     m_peer->SetLabel( wxStripMenuCodes(m_label, wxStrip_Mnemonics) ) ;
 
     if (!m_macIsUserPane)
-        SetInitialBestSize(size);
+        SetInitialSize(size);
 
     SetCursor( *wxSTANDARD_CURSOR ) ;
 }
index e34226021d3df534bc58cce93f591c1621106f1f..4192e30e3f53b6a1d8cb23ebbecc678f0c13bdb0 100644 (file)
@@ -60,7 +60,7 @@ bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id,
     m_windowStyle = style;
 
     bool ret = wxControl::Create( parent, id, pos, size, style , wxDefaultValidator , name );
-    SetBestSize( size ) ;
+    SetInitialSize( size ) ;
 
     return ret;
 }
index a249f3bd58b6b1f9aabd0a9242e4d69d78819293..26bcaf3344b85d0452a2198db91ef97258f37217 100644 (file)
@@ -49,7 +49,7 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id,
         return false;
     }
 
-    SetBestSize( size ) ;
+    SetInitialSize( size ) ;
 
     return true;
 }
index d4848e4d5fc96c61c0c468beb60e624aae8b0e78..1d16f90dab43b14438fcbbbadf6fc8ac554205ac 100644 (file)
@@ -184,7 +184,7 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id,
     SubclassWin(m_hWnd);
 
     SetPosition(pos);
-    SetBestSize(size);
+    SetInitialSize(size);
 
     return true;
 }
index 67feff05126205e314c375f56253e2e5c324789c..8fc25f779d823919438ef4ced84151d85580137b 100644 (file)
@@ -153,7 +153,7 @@ bool wxChoice::CreateAndInit(wxWindow *parent,
     }
 
     // and now we may finally size the control properly (if needed)
-    SetBestSize(size);
+    SetInitialSize(size);
 
     return true;
 }
index 6f70e37d05951595ab48042c043702887ac3bdfa..367f609c50038b717db6f5aa0a705cb4fb422a86 100644 (file)
@@ -149,8 +149,8 @@ bool wxComboCtrl::Create(wxWindow *parent,
     // Prepare background for double-buffering
     SetBackgroundStyle( wxBG_STYLE_CUSTOM );
 
-    // SetBestSize should be called last
-    SetBestSize(size);
+    // SetInitialSize should be called last
+    SetInitialSize(size);
 
     return true;
 }
index 9817456107b04b0f38d0f71802e8cdd2e649820c..3797cab6254b1bd62a313e90091594657af4c23f 100644 (file)
@@ -196,7 +196,7 @@ bool wxControl::MSWCreateControl(const wxChar *classname,
     }
 
     // set the size now if no initial size specified
-    SetInitialBestSize(size);
+    SetInitialSize(size);
 
     return true;
 }
index bc989f5d32e3f200e42db7d364acf596063f50e7..c48879e34beaffd041616427968858d6d758a214 100644 (file)
@@ -177,7 +177,7 @@ bool wxListBox::Create(wxWindow *parent,
     }
 
     // now we can compute our best size correctly, so do it if necessary
-    SetBestSize(size);
+    SetInitialSize(size);
 
     return true;
 }
index 94ffdaf7aa2572702732e7f955ef52158345d6cf..95f6f127c47762f878edb580a24af2b73e4e5ccf 100644 (file)
@@ -211,7 +211,7 @@ bool wxRadioBox::Create(wxWindow *parent,
     SetSize(pos.x, pos.y, size.x, size.y);
 
     // Now that we have items determine what is the best size and set it.
-    SetBestSize(size);
+    SetInitialSize(size);
 
     return true;
 }
index b4b9cfb1e76fc6d8852c3d16c4c7b3b5e7ca0d91..4858bae02dcfd16a2871739da9f2a79c6a087bd7 100644 (file)
@@ -195,7 +195,7 @@ bool wxSpinButton::Create(wxWindow *parent,
 
     SubclassWin(m_hWnd);
 
-    SetBestSize(size);
+    SetInitialSize(size);
 
     return true;
 }
index 14bdda9ae059d05c6383ceaf83cd907167e1c246..80d15e665b62ac9770a796385deadfde525da2ab 100644 (file)
@@ -391,7 +391,7 @@ bool wxSpinCtrl::Create(wxWindow *parent,
         sizeText.y = EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy);
     }
 
-    SetBestSize(size);
+    SetInitialSize(size);
 
     (void)::ShowWindow(GetBuddyHwnd(), SW_SHOW);
 
index 26a32bf03b6a2ff351329f10fd539b73d8b2a7c0..cd03008f89e66d50df44c2d1c863af9ed8b4644f 100644 (file)
@@ -166,7 +166,7 @@ bool wxStaticBitmap::Create(wxWindow *parent,
     SetImageNoCopy(image);
 
     // GetBestSize will work properly now, so set the best size if needed
-    SetBestSize(size);
+    SetInitialSize(size);
 
     return true;
 }
index 24215c91f30712bd5437a5ae237e747016beb722..7f14ed6c63fd7940a05eacbd4445f5d9bab708fc 100644 (file)
@@ -116,7 +116,7 @@ bool wxCheckListBox::Create(wxWindow *parent, wxWindowID id,
     m_itemsClientData.SetCount(n);
 
     // now we can compute our best size correctly, so do it if necessary
-    SetBestSize(size);
+    SetInitialSize(size);
 
     return true;
 }
index 5540dcca03f571e1f4a21ad078d7533ccc646a24..40f7dc81202abd4d219b1a642eb4c6d365f0d4cd 100644 (file)
@@ -244,7 +244,7 @@ bool wxChoice::CreateAndInit(wxWindow *parent,
         sizeText.y = EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy);
     }
 
-    SetBestSize(size);
+    SetInitialSize(size);
 
     (void)::ShowWindow(GetBuddyHwnd(), SW_SHOW);
 
index 1a83ef5cb34dff55999b639ea3457ad53e99eb3d..a9d97de8cc37dab3497b0666f942dafe2234100f 100644 (file)
@@ -256,7 +256,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
         sizeText.y = EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy);
     }
 
-    SetBestSize(size);
+    SetInitialSize(size);
 
     (void)::ShowWindow(GetBuddyHwnd(), SW_SHOW);
 
index 770da88cccc274c1e4c1cba5edc3043f166adca9..1e62c4f6c000afe2bfa38bffa4e8e823a38b98a7 100644 (file)
@@ -107,7 +107,7 @@ bool wxChoice::Create(
     int  nEditHeight;
     wxGetCharSize( GetHWND(), NULL, &nEditHeight, &vFont );
     nEditHeight = EDIT_HEIGHT_FROM_CHAR_HEIGHT(nEditHeight);
-    SetBestFittingSize(wxSize(-1,nEditHeight+4));   // +2x2 for the border
+    SetInitialSize(wxSize(-1,nEditHeight+4));   // +2x2 for the border
 
     return true;
 } // end of wxChoice::Create
index f1862b75bf935f012ae02765aee963bda52cb1d2..75a033757860dc55d5103375ab142aa6dde81532 100644 (file)
@@ -167,7 +167,7 @@ bool wxComboBox::Create(
     int nEditHeight;
     wxGetCharSize( GetHWND(), NULL, &nEditHeight, &vFont );
     nEditHeight = EDIT_HEIGHT_FROM_CHAR_HEIGHT(nEditHeight);
-    SetBestFittingSize(wxSize(-1,nEditHeight+4));   // +2x2 for the border
+    SetInitialSize(-1,nEditHeight+4));   // +2x2 for the border
 
     if (!rsValue.empty())
     {
index 45f5e2a571c8ec89be8763979218ccaf25b560bd..2211ff15370a6447041051778c892a1187cc31f8 100644 (file)
@@ -152,7 +152,7 @@ bool wxControl::PalmCreateControl(int style,
 
     m_palmControl = true;
 
-    SetInitialBestSize(size);
+    SetInitialSize(size);
     SetLabel(label);
     Show();
     return true;
@@ -202,7 +202,7 @@ bool wxControl::PalmCreateField(const wxString& label,
 
     m_palmField = true;
 
-    SetInitialBestSize(size);
+    SetInitialSize(size);
     SetLabel(label);
     Show();
     return true;
index fc4ab1a954b560da786fb4a9a53024ed1546e77a..72bb092ca1e32d31c6670ed60a1d277c3dd81d5c 100644 (file)
@@ -155,7 +155,7 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id,
     if(slider==NULL)
         return false;
 
-    SetInitialBestSize(size);
+    SetInitialSize(size);
     Show();
     return true;
 }
index 05f6ed499914830fca073d02d08c45688bf67a1b..636c49443972f05c48317d86accc05b5cd23aee8 100644 (file)
@@ -157,7 +157,7 @@ bool wxRichTextCtrl::Create( wxWindow* parent, wxWindowID id, const wxString& va
     SetBackgroundStyle(wxBG_STYLE_CUSTOM);
 
     // Tell the sizers to use the given or best size
-    SetBestFittingSize(size);
+    SetInitialSize(size);
 
 #if wxRICHTEXT_BUFFERED_PAINTING
     // Create a buffer
index a0817a69b2df594a15718c4235c5b8030f71fa8e..804f28061dcf60e850eab05b8b7c452803019c6d 100644 (file)
@@ -737,7 +737,7 @@ bool wxRichTextStyleListCtrl::Create(wxWindow* parent, wxWindowID id, const wxPo
 
     SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
     if (size != wxDefaultSize)
-        SetBestFittingSize(size);
+        SetInitialSize(size);
 
     bool showSelector = ((style & wxRICHTEXTSTYLELIST_HIDE_TYPE_SELECTOR) == 0);
 
index bc54bf966ca796c45430a192f3600b658e851c75..0bf46f60b46edcf52e0a3496ba3160bab7230ae7 100644 (file)
@@ -179,7 +179,7 @@ bool wxStyledTextCtrl::Create(wxWindow *parent,
     SetCodePage(wxSTC_CP_UTF8);
 #endif
 
-    SetBestFittingSize(size);
+    SetInitialSize(size);
 
     // Reduces flicker on GTK+/X11
     SetBackgroundStyle(wxBG_STYLE_CUSTOM);
index 2a9806a68a2adf03772aea3010017a41e22ce928..d1a1701a532f913fcb6cf939b0f64e5a19353eca 100644 (file)
@@ -179,7 +179,7 @@ bool wxStyledTextCtrl::Create(wxWindow *parent,
     SetCodePage(wxSTC_CP_UTF8);
 #endif
 
-    SetBestFittingSize(size);
+    SetInitialSize(size);
 
     // Reduces flicker on GTK+/X11
     SetBackgroundStyle(wxBG_STYLE_CUSTOM);
index f04966be286c83a4632741964eeb9bf3938f5b55..c1a5aa5b20f38e85e15d3fb85e651c5a1699d0e3 100644 (file)
@@ -128,9 +128,9 @@ bool wxButton::Create(wxWindow *parent,
     SetLabel(label);
 
     if (bitmap.Ok())
-        SetImageLabel(bitmap); // SetBestSize called by SetImageLabel()
+        SetImageLabel(bitmap); // SetInitialSize called by SetImageLabel()
     else
-        SetBestSize(size);
+        SetInitialSize(size);
 
     CreateInputHandler(wxINP_HANDLER_BUTTON);
 
@@ -327,7 +327,7 @@ void wxButton::SetImageMargins(wxCoord x, wxCoord y)
     m_marginBmpX = x + 2;
     m_marginBmpY = y + 2;
 
-    SetBestSize(wxDefaultSize);
+    SetInitialSize(wxDefaultSize);
 }
 
 void wxButton::SetDefault()
index de5865cb8434be11577465f980c58346d54b4270..520a2edf058dc20b47cf0c1b13f5bb864467f1d2 100644 (file)
@@ -84,7 +84,7 @@ bool wxCheckBox::Create(wxWindow *parent,
         return false;
 
     SetLabel(label);
-    SetBestSize(size);
+    SetInitialSize(size);
 
     CreateInputHandler(wxINP_HANDLER_CHECKBOX);
 
index 5043825c2278dbd5f9c5c177ae7d06443ff011ab..c887c2cf176cced1e02e0a87080eba4db5d683d0 100644 (file)
@@ -64,7 +64,7 @@ bool wxGauge::Create(wxWindow *parent,
         return false;
     }
 
-    SetBestSize(size);
+    SetInitialSize(size);
 
     return true;
 }
index 0ad1318cf7b91c1f630fbd78df1fc59674b83bfb..7aaa9953f3386770ef2632676beca0ec029c3d54 100644 (file)
@@ -196,7 +196,7 @@ bool wxListBox::Create(wxWindow *parent,
 
     Set(n, choices);
 
-    SetBestSize(size);
+    SetInitialSize(size);
 
     CreateInputHandler(wxINP_HANDLER_LISTBOX);
 
index ebe2c8bb583db6278a2b54759df17e616df62727..392f13c4aa5a6c9c6684b0e4279f0762b7963a44 100644 (file)
@@ -153,7 +153,7 @@ bool wxNotebook::Create(wxWindow *parent,
 
     m_sizePad = GetRenderer()->GetTabPadding();
 
-    SetBestSize(size);
+    SetInitialSize(size);
 
     CreateInputHandler(wxINP_HANDLER_NOTEBOOK);
 
index b5e1253f3dcc38df73050a3bb1d5ccd880afa2ae..f316f14715f661fd7dbdcc3c88e344a3aac3fa92 100644 (file)
@@ -146,7 +146,7 @@ bool wxScrollBar::Create(wxWindow *parent,
     if ( !wxControl::Create(parent, id, pos, size, style, validator, name) )
         return false;
 
-    SetBestSize(size);
+    SetInitialSize(size);
 
     // override the cursor of the target window (if any)
     SetCursor(wxCURSOR_ARROW);
index 4df2aae29a84810976ef866ca7ce4adba8d2d65a..0e29c6080665404a15a5feb1e589c5258297248d 100644 (file)
@@ -171,7 +171,7 @@ bool wxSlider::Create(wxWindow *parent,
 
     // call this after setting the range as the best size depends (at least if
     // we have wxSL_LABELS style) on the range
-    SetBestSize(size);
+    SetInitialSize(size);
 
     CreateInputHandler(wxINP_HANDLER_SLIDER);
 
index c322345dee871d98ee677f9202eb8ca5f905ff47..e1d885795b7660168b04fd83f1f860759757cc7c 100644 (file)
@@ -98,7 +98,7 @@ bool wxSpinButton::Create(wxWindow *parent,
                                    wxDefaultValidator, name) )
         return false;
 
-    SetBestSize(size);
+    SetInitialSize(size);
 
     CreateInputHandler(wxINP_HANDLER_SPINBTN);
 
index c71ce2a7b4659ce6c2b9e9e133195bba9b568b5a..6059a8ab2e195ce4a8a4a18ae1f6d18e470d2f7c 100644 (file)
@@ -61,7 +61,7 @@ bool wxStaticBitmap::Create(wxWindow *parent,
     SetBitmap(label);
 
     // and adjust our size to fit it after this
-    SetBestSize(size);
+    SetInitialSize(size);
 
     return true;
 }
index 38da4fb592b02d1b877b4970fae732f68d5bb042..509a5d6dde3b09c1313ab15180170507ab786aba 100644 (file)
@@ -57,7 +57,7 @@ bool wxStaticText::Create(wxWindow *parent,
         return false;
 
     SetLabel(label);
-    SetBestSize(size);
+    SetInitialSize(size);
 
     return true;
 }
index ff7515af56758b1cf4b71677593cae22aee4ea6f..ebb49dcc83037353cefa7873c71e7014a3a52cda 100644 (file)
@@ -740,7 +740,7 @@ bool wxTextCtrl::Create(wxWindow *parent,
 
     RecalcFontMetrics();
     SetValue(value);
-    SetBestSize(size);
+    SetInitialSize(size);
 
     m_isEditable = !(style & wxTE_READONLY);
 
index a83cc7fac3abde64a3a8684571b7215356de8849..fafb168d02de42e17de369ecd73b597305f24139 100644 (file)
@@ -192,7 +192,7 @@ bool wxToolBar::Create(wxWindow *parent,
 
     CreateInputHandler(wxINP_HANDLER_TOOLBAR);
 
-    SetBestSize(size);
+    SetInitialSize(size);
 
     return true;
 }
@@ -421,7 +421,7 @@ bool wxToolBar::Realize()
     m_needsLayout = true;
     DoLayout();
 
-    SetBestSize(wxDefaultSize);
+    SetInitialSize(wxDefaultSize);
 
     return true;
 }
index 5737a2da1cfaeed5c5adb218dab2cab1dc04a654..9d816036da0c4697e7bbe6bfd9ad98f9389d177b 100644 (file)
@@ -1543,7 +1543,6 @@ class CustomTreeCtrl(CT.CustomTreeCtrl):
         
         self.PopupMenu(menu)
         menu.Destroy()
-        event.Skip()
         
 
     def OnItemBackground(self, event):
@@ -1559,7 +1558,6 @@ class CustomTreeCtrl(CT.CustomTreeCtrl):
             col1 = data.GetColour().Get()
             self.SetItemBackgroundColour(self.current, col1)
         dlg.Destroy()
-        event.Skip()
 
 
     def OnItemForeground(self, event):
@@ -1575,13 +1573,11 @@ class CustomTreeCtrl(CT.CustomTreeCtrl):
             col1 = data.GetColour().Get()
             self.SetItemTextColour(self.current, col1)
         dlg.Destroy()
-        event.Skip()
 
 
     def OnItemBold(self, event):
 
         self.SetItemBold(self.current, not self.itemdict["isbold"])
-        event.Skip()
 
 
     def OnItemFont(self, event):
@@ -1602,13 +1598,11 @@ class CustomTreeCtrl(CT.CustomTreeCtrl):
             self.SetItemFont(self.current, font)
 
         dlg.Destroy()
-        event.Skip()
         
 
     def OnItemHyperText(self, event):
 
         self.SetItemHyperText(self.current, not self.itemdict["ishtml"])
-        event.Skip()
 
 
     def OnEnableWindow(self, event):
@@ -1616,13 +1610,10 @@ class CustomTreeCtrl(CT.CustomTreeCtrl):
         enable = self.GetItemWindowEnabled(self.current)
         self.SetItemWindowEnabled(self.current, not enable)
 
-        event.Skip()
-
 
     def OnDisableItem(self, event):
 
         self.EnableItem(self.current, False)
-        event.Skip()
         
 
     def OnItemIcons(self, event):
@@ -1634,7 +1625,6 @@ class CustomTreeCtrl(CT.CustomTreeCtrl):
         dlg = TreeIcons(self, -1, bitmaps=bitmaps)
         wx.EndBusyCursor()
         dlg.ShowModal()
-        event.Skip()
 
 
     def SetNewIcons(self, bitmaps):
@@ -1668,7 +1658,6 @@ class CustomTreeCtrl(CT.CustomTreeCtrl):
         dlg.ShowModal()
         dlg.Destroy()
                 
-        event.Skip()
         
 
     def OnItemDelete(self, event):
@@ -1686,7 +1675,6 @@ class CustomTreeCtrl(CT.CustomTreeCtrl):
         self.Delete(self.current)
         self.current = None
         
-        event.Skip()        
 
 
     def OnItemPrepend(self, event):
@@ -1699,7 +1687,6 @@ class CustomTreeCtrl(CT.CustomTreeCtrl):
             self.EnsureVisible(newitem)
 
         dlg.Destroy()
-        event.Skip()
 
 
     def OnItemAppend(self, event):
@@ -1712,7 +1699,6 @@ class CustomTreeCtrl(CT.CustomTreeCtrl):
             self.EnsureVisible(newitem)
 
         dlg.Destroy()
-        event.Skip()
         
 
     def OnBeginEdit(self, event):
index f99c65e3e67b5a643ba8fbbd75cfbedcd7d3e58f..7a08befcffa76514d1f96ea3c8f737df277f7fe9 100644 (file)
@@ -43,7 +43,6 @@ class TestPanel(wx.Panel):
         self.Bind(wx.EVT_BUTTON, self.OnBiggerButton, b)
         b.SetFont(wx.Font(20, wx.SWISS, wx.NORMAL, wx.BOLD, False))
         b.SetBezelWidth(5)
-        ###b.SetBestSize()
         b.SetMinSize(wx.DefaultSize)
         b.SetBackgroundColour("Navy")
         b.SetForegroundColour(wx.WHITE)
@@ -76,7 +75,7 @@ class TestPanel(wx.Panel):
         mask = wx.Mask(bmp, wx.BLUE)
         bmp.SetMask(mask)
         b.SetBitmapSelected(bmp)
-        b.SetBestSize()
+        b.SetInitialSize()
         sizer.Add(b)
 
         # A toggle button
@@ -96,7 +95,7 @@ class TestPanel(wx.Panel):
         bmp.SetMask(mask)
         b.SetBitmapSelected(bmp)
         b.SetToggle(True)
-        b.SetBestSize()
+        b.SetInitialSize()
         sizer.Add(b)
 
         # A bitmap button with text.
@@ -111,7 +110,7 @@ class TestPanel(wx.Panel):
         bmp.SetMask(mask)
         b.SetBitmapSelected(bmp)
         b.SetUseFocusIndicator(False)
-        b.SetBestSize()
+        b.SetInitialSize()
         sizer.Add(b)
 
 
index 51f51ac4b285920fc611076f525d0d84d6d86f81..9f624a3a18026dc6d54a2aa411c23f4dceb40f5b 100644 (file)
@@ -95,7 +95,7 @@ class TestPanel(wx.Panel):
                           "ERROR",
                           wx.ICON_ERROR | wx.OK)
         else:
-            self.mc.SetBestFittingSize()
+            self.mc.SetInitialSize()
             self.GetSizer().Layout()
             self.slider.SetRange(0, self.mc.Length())
 
@@ -108,7 +108,7 @@ class TestPanel(wx.Panel):
                           "ERROR",
                           wx.ICON_ERROR | wx.OK)
         else:
-            self.mc.SetBestFittingSize()
+            self.mc.SetInitialSize()
             self.GetSizer().Layout()
             self.slider.SetRange(0, self.mc.Length())
 
index f8185ed1c4c553579f7885a9ecb8479eeccfc89d..79bb1a0358711082a94cbafadcbba4a05630a899 100644 (file)
@@ -299,7 +299,7 @@ class Frame(wx.Frame):
         w = b.GenButton(p, -1, "Generic Button")
         w.SetFont(wx.Font(20, wx.SWISS, wx.NORMAL, wx.BOLD, False))
         w.SetBezelWidth(5)
-        w.SetBestSize()
+        w.SetInitialSize()
         w.SetBackgroundColour("Navy")
         w.SetForegroundColour(wx.WHITE)
         self.DoWidget(w)
index bcb463e87c1e42bf319024aea88a2601ea10ac17..21a61861ca912564c94a934198d1d61239a0642c 100644 (file)
@@ -446,7 +446,7 @@ class SizeInfoPane(wx.Panel):
         self._minsize.SetValue(    str(win.GetMinSize()) )
         self._bestsize.SetValue(   str(win.GetBestSize()) )
         self._adjbstsize.SetValue( str(win.GetAdjustedBestSize()) )
-        self._bestfit.SetValue(    str(win.GetBestFittingSize()) )
+        self._bestfit.SetValue(    str(win.GetEffectiveMinSize()) )
 
     def Clear(self):
         self._size.SetValue("")
index a9ad85b4d9fc9feb940eb5fed0d0237b87f7c132..bb543a1182ab74a99cd085aa661aa10fc41dd92d 100644 (file)
@@ -34,7 +34,6 @@ public:
                 const wxString& name = wxPyControlNameStr)
         : wxControl(parent, id, pos, size, style, validator, name) {}
 
-    void SetBestSize(const wxSize& size) { wxControl::SetBestSize(size); }
 
     bool DoEraseBackground(wxDC* dc) {
 #ifdef __WXMSW__
@@ -133,7 +132,6 @@ public:
     
     void _setCallbackInfo(PyObject* self, PyObject* _class);
 
-    void SetBestSize(const wxSize& size);
     bool DoEraseBackground(wxDC* dc);
     
     void DoMoveWindow(int x, int y, int width, int height);
index 9b9a06188d75c68bda8e91d49eabba37c1e6043b..1305baebd3b6b0fb00c5c28f516743f91fc6b815 100644 (file)
@@ -62,7 +62,6 @@ public:
                const wxString& name = wxPyPanelNameStr)
         : wxWindow(parent, id, pos, size, style, name) {}
 
-    void SetBestSize(const wxSize& size) { wxWindow::SetBestSize(size); }
 
     bool DoEraseBackground(wxDC* dc) {
 #ifdef __WXMSW__
@@ -160,7 +159,6 @@ public:
     
     void _setCallbackInfo(PyObject* self, PyObject* _class);
 
-    void SetBestSize(const wxSize& size);
     bool DoEraseBackground(wxDC* dc);
     
     void DoMoveWindow(int x, int y, int width, int height);
@@ -245,7 +243,6 @@ public:
                const wxString& name = wxPyPanelNameStr)
         : wxPanel(parent, id, pos, size, style, name) {}
 
-    void SetBestSize(const wxSize& size) { wxPanel::SetBestSize(size); }
     bool DoEraseBackground(wxDC* dc) {
 #ifdef __WXMSW__
         return wxWindow::DoEraseBackground(dc->GetHDC());
@@ -343,7 +340,6 @@ public:
 
     void _setCallbackInfo(PyObject* self, PyObject* _class);
 
-    void SetBestSize(const wxSize& size);
     bool DoEraseBackground(wxDC* dc);
     
     void DoMoveWindow(int x, int y, int width, int height);
@@ -421,7 +417,6 @@ public:
                const wxString& name = wxPyPanelNameStr)
         : wxScrolledWindow(parent, id, pos, size, style, name) {}
 
-    void SetBestSize(const wxSize& size) { wxScrolledWindow::SetBestSize(size); }
     bool DoEraseBackground(wxDC* dc) {
 #ifdef __WXMSW__
         return wxWindow::DoEraseBackground(dc->GetHDC());
@@ -518,7 +513,6 @@ public:
 
     void _setCallbackInfo(PyObject* self, PyObject* _class);
 
-    void SetBestSize(const wxSize& size);
     bool DoEraseBackground(wxDC* dc);
     
     void DoMoveWindow(int x, int y, int width, int height);
index eaba0b3e0f590a0306369c5665caf3064dc3375b..1fe38d65396b19394619a91214c87053242614d3 100644 (file)
@@ -448,10 +448,10 @@ equal to -1.
         MoveXY);
     
     DocDeclStr(
-        void , SetBestFittingSize(const wxSize& size=wxDefaultSize),
+        void , SetInitialSize(const wxSize& size=wxDefaultSize),
         "A 'Smart' SetSize that will fill in default size components with the
 window's *best size* values.  Also set's the minsize for use with sizers.", "");
-    
+    %pythoncode { SetBestFittingSize = wx._deprecated(SetInitialSize, 'Use `SetInitialSize`') }
 
     
     DocDeclStr(
@@ -571,19 +571,19 @@ some properties of the window change.)", "");
 
     
     DocDeclStr(
-        wxSize , GetBestFittingSize() const,
+        wxSize , GetEffectiveMinSize() const,
         "This function will merge the window's best size into the window's
 minimum size, giving priority to the min size components, and returns
 the results.
 ", "");
-    
+    %pythoncode { GetBestFittingSize = wx._deprecated(GetEffectiveMinSize, , 'Use `GetEffectiveMinSize` instead.') }
 
     %pythoncode {
         def GetAdjustedBestSize(self):
             s = self.GetBestSize()
             return wx.Size(max(s.width,  self.GetMinWidth()),
                            max(s.height, self.GetMinHeight()))
-        GetAdjustedBestSize = wx._deprecated(GetAdjustedBestSize, 'Use `GetBestFittingSize` instead.')
+        GetAdjustedBestSize = wx._deprecated(GetAdjustedBestSize, 'Use `GetEffectiveMinSize` instead.')
     }
     
 
@@ -2077,7 +2077,7 @@ opaque.", "");
     %property(AutoLayout, GetAutoLayout, SetAutoLayout, doc="See `GetAutoLayout` and `SetAutoLayout`");
     %property(BackgroundColour, GetBackgroundColour, SetBackgroundColour, doc="See `GetBackgroundColour` and `SetBackgroundColour`");
     %property(BackgroundStyle, GetBackgroundStyle, SetBackgroundStyle, doc="See `GetBackgroundStyle` and `SetBackgroundStyle`");
-    %property(BestFittingSize, GetBestFittingSize, SetBestFittingSize, doc="See `GetBestFittingSize` and `SetBestFittingSize`");
+    %property(EffectiveMinSize, GetEffectiveMinSize, doc="See `GetEffectiveMinSize`");
     %property(BestSize, GetBestSize, doc="See `GetBestSize`");
     %property(BestVirtualSize, GetBestVirtualSize, doc="See `GetBestVirtualSize`");
     %property(Border, GetBorder, doc="See `GetBorder`");
index b9b256fa80d5bd5a5c2c47be459bb5fadeac88d6..16a7c4d3999c89f9158c8ee887ff7c9f4ea97d5f 100644 (file)
@@ -92,7 +92,7 @@ class AnalogClock(wx.PyWindow):
         self.Bind(wx.EVT_MENU, self._OnShowAbout, id=popup2)
 
         # Set initial size based on given size, or best size
-        self.SetBestFittingSize(size)
+        self.SetInitialSize(size)
 
         # Do initial drawing (in case there is not an initial size event)
         self.RecalcCoords(self.GetSize())
index a31eb087186f79df04f2066da25809049e0dbaa5..7df01da87d63a3578b3f61796cc7bb31fb267346 100644 (file)
@@ -620,7 +620,7 @@ class BPArt:
             if isVertical:
                 dc.DrawLine(rect.x, coord, rect.x + rect.width, coord) 
             else:
-                dc.DrawLine(coord, rect.y, coord, rect.y + rect.width)
+                dc.DrawLine(coord, rect.y, coord, rect.y + rect.height)
                 
             rf += rstep
             gf += gstep
index f1e2f737a8454d0948ff161b82bd6c31b230306d..f4b9d7b4fbf6db9a7a67f0188a2c8b05a6ad509c 100644 (file)
@@ -77,7 +77,7 @@ class GenButton(wx.PyControl):
 
         self.SetLabel(label)
         self.InheritAttributes()
-        self.SetBestFittingSize(size)
+        self.SetInitialSize(size)
         self.InitColours()
 
         self.Bind(wx.EVT_LEFT_DOWN,        self.OnLeftDown)
@@ -92,15 +92,16 @@ class GenButton(wx.PyControl):
         self.Bind(wx.EVT_PAINT,            self.OnPaint)
 
 
-    def SetBestSize(self, size=None):
+    def SetInitialSize(self, size=None):
         """
         Given the current font and bezel width settings, calculate
         and set a good size.
         """
         if size is None:
             size = wx.DefaultSize            
-        wx.PyControl.SetBestFittingSize(self, size)
-
+        wx.PyControl.SetInitialSize(self, size)
+    SetBestSize = SetInitialSize
+    
 
     def DoGetBestSize(self):
         """
index c7c97bdc7377020ad102bea5379496c7a08aaca6..33ac41ad2dc09850c56b6614e2d2089a863346b6 100644 (file)
@@ -133,7 +133,7 @@ class BaseMaskedComboBox( wx.ComboBox, MaskedEditMixin ):
             self.SetClientSize(self._CalcSize())
             width = self.GetSize().width
             height = self.GetBestSize().height
-            self.SetBestFittingSize((width, height))
+            self.SetInitialSize((width, height))
 
 
         if value:
@@ -189,7 +189,7 @@ class BaseMaskedComboBox( wx.ComboBox, MaskedEditMixin ):
             width = self.GetSize().width
             height = self.GetBestSize().height
 ##            dbg('setting client size to:', (width, height))
-            self.SetBestFittingSize((width, height))
+            self.SetInitialSize((width, height))
 
 
     def _GetSelection(self):
index ec608dbf626c1545781c476a0c0eeaa83ca437fa..7127285046c0b0a3e9d316020451b706df4b6c77 100644 (file)
@@ -1992,7 +1992,7 @@ class MaskedEditMixin:
                 width = self.GetSize().width
                 height = self.GetBestSize().height
 ##                dbg('setting client size to:', (width, height))
-                self.SetBestFittingSize((width, height))
+                self.SetInitialSize((width, height))
 
             # Set value/type-specific formatting
             self._applyFormatting()
@@ -2076,7 +2076,7 @@ class MaskedEditMixin:
                     #  the outside size that does include the borders.  What you are
                     #  calculating (in _CalcSize) is the client size, but the sizers
                     #  deal with the full size and so that is the minimum size that
-                    #  we need to set with SetBestFittingSize.  The root of the problem is
+                    #  we need to set with SetInitialSize.  The root of the problem is
                     #  that in _calcSize the current client size height is returned,
                     #  instead of a height based on the current font.  So I suggest using
                     #  _calcSize to just get the width, and then use GetBestSize to
@@ -2084,7 +2084,7 @@ class MaskedEditMixin:
                     self.SetClientSize(self._CalcSize())
                     width = self.GetSize().width
                     height = self.GetBestSize().height
-                    self.SetBestFittingSize((width, height))
+                    self.SetInitialSize((width, height))
 
 
             # Set value/type-specific formatting
index 93c1a1c1019855e0cfee935466ecd68882001702..d374d7b247ace6ee85621d6cfc81ca5d26276919 100644 (file)
@@ -239,7 +239,7 @@ class BaseMaskedTextCtrl( wx.TextCtrl, MaskedEditMixin ):
             width = self.GetSize().width
             height = self.GetBestSize().height
 ##            dbg('setting client size to:', (width, height))
-            self.SetBestFittingSize((width, height))
+            self.SetInitialSize((width, height))
 
 
     def Clear(self):
index 122cdde7bd4eeddb436538ad7c09b21829839db6..1d92901f9e85c567552a47acdfa5fa1ad76c7fab 100644 (file)
@@ -38,7 +38,7 @@ class ScrolledPanel( wx.PyScrolledWindow ):
         wx.PyScrolledWindow.__init__(self, parent, id,
                                      pos=pos, size=size,
                                      style=style, name=name)
-        self.SetBestFittingSize(size)
+        self.SetInitialSize(size)
         self.Bind(wx.EVT_CHILD_FOCUS, self.OnChildFocus)
 
 
index 6a819a41ac618a8f698a91dacae9a5e0e3a0e4f4..c5e2e85f55cc16eaee1a4c3c31cf779eae7cd3c9 100644 (file)
@@ -240,14 +240,14 @@ class MultiSplitterWindow(wx.PyPanel):
         sashsize = self._GetSashSize()
         if self._orient == wx.HORIZONTAL:
             for win in self._windows:
-                winbest = win.GetAdjustedBestSize()
+                winbest = win.GetEffectiveMinSize()
                 best.width += max(self._minimumPaneSize, winbest.width)
                 best.height = max(best.height, winbest.height)
             best.width += sashsize * (len(self._windows)-1)
 
         else:
             for win in self._windows:
-                winbest = win.GetAdjustedBestSize()
+                winbest = win.GetEffectiveMinSize()
                 best.height += max(self._minimumPaneSize, winbest.height)
                 best.width = max(best.width, winbest.width)
             best.height += sashsize * (len(self._windows)-1)
index bd4ab445145a3e51868d2aa642414a13fa130100..3585446ee62322beceb4fee0c05e90043f546166 100644 (file)
@@ -27,7 +27,7 @@ class GenStaticBitmap(wx.PyControl):
                              wx.DefaultValidator, name)
         self._bitmap = bitmap
         self.InheritAttributes()
-        self.SetBestFittingSize(size)
+        self.SetInitialSize(size)
 
         self.Bind(wx.EVT_ERASE_BACKGROUND, self.OnEraseBackground)
         self.Bind(wx.EVT_PAINT,            self.OnPaint)
@@ -35,7 +35,7 @@ class GenStaticBitmap(wx.PyControl):
 
     def SetBitmap(self, bitmap):
         self._bitmap = bitmap
-        self.SetBestFittingSize( (bitmap.GetWidth(), bitmap.GetHeight()) )
+        self.SetInitialSize( (bitmap.GetWidth(), bitmap.GetHeight()) )
         self.Refresh()
 
 
index 1f47005e3661880dafc01e5c419eec1c8927bf0b..fddbf4e60e1ffa5e723c7bbbb34625ce8cc2e041 100644 (file)
@@ -36,7 +36,7 @@ class GenStaticText(wx.PyControl):
 
         wx.PyControl.SetLabel(self, label) # don't check wx.ST_NO_AUTORESIZE yet
         self.InheritAttributes()
-        self.SetBestFittingSize(size)
+        self.SetInitialSize(size)
 
         self.Bind(wx.EVT_PAINT, self.OnPaint)
         if BUFFERED:
@@ -56,7 +56,7 @@ class GenStaticText(wx.PyControl):
         style = self.GetWindowStyleFlag()
         self.InvalidateBestSize()
         if not style & wx.ST_NO_AUTORESIZE:
-            self.SetBestFittingSize(self.GetBestSize())
+            self.SetInitialSize(self.GetBestSize())
         self.Refresh()
 
 
@@ -69,7 +69,7 @@ class GenStaticText(wx.PyControl):
         style = self.GetWindowStyleFlag()
         self.InvalidateBestSize()
         if not style & wx.ST_NO_AUTORESIZE:
-            self.SetBestFittingSize(self.GetBestSize())
+            self.SetInitialSize(self.GetBestSize())
         self.Refresh()
 
 
index 927d98082e7c784eebe56c6c5151d90d954b4b79..869e45aef421d75d3cca6654955dcb3d420bea56 100644 (file)
@@ -50,7 +50,7 @@ class Ticker(wx.PyControl):
         self._ppf = ppf  #pixels per frame
         self.SetDirection(direction)
         self.SetText(text)
-        self.SetBestFittingSize(size)
+        self.SetInitialSize(size)
         self.SetForegroundColour(fgcolor)
         self.SetBackgroundColour(bgcolor)
         wx.EVT_TIMER(self, -1, self.OnTick)