]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/_pywindows.i
Invalidate best size after string change in wxChoice.
[wxWidgets.git] / wxPython / src / _pywindows.i
index 9b9a06188d75c68bda8e91d49eabba37c1e6043b..5ec3889dc3241dc7139f7bf2d96047c1e17ca9cf 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__
@@ -147,7 +146,7 @@ MustHaveApp(wxPyWindow);
 class wxPyWindow : public wxWindow
 {
 public:
-    %pythonAppend wxPyWindow         "self._setOORInfo(self); self._setCallbackInfo(self, PyWindow)"
+    %pythonAppend wxPyWindow         "self._setOORInfo(self);" setCallbackInfo(PyWindow)
     %pythonAppend wxPyWindow()       ""
 
     wxPyWindow(wxWindow* parent, const wxWindowID id=-1,
@@ -160,7 +159,7 @@ public:
     
     void _setCallbackInfo(PyObject* self, PyObject* _class);
 
-    void SetBestSize(const wxSize& size);
+    %pythoncode { SetBestSize = wx.Window.SetInitialSize }
     bool DoEraseBackground(wxDC* dc);
     
     void DoMoveWindow(int x, int y, int width, int height);
@@ -241,11 +240,10 @@ public:
     wxPyPanel(wxWindow* parent, const wxWindowID id,
                const wxPoint& pos = wxDefaultPosition,
                const wxSize& size = wxDefaultSize,
-               long style = 0,
+               long style = wxTAB_TRAVERSAL | wxNO_BORDER,
                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());
@@ -330,20 +328,20 @@ MustHaveApp(wxPyPanel);
 class wxPyPanel : public wxPanel
 {
 public:
-    %pythonAppend wxPyPanel         "self._setOORInfo(self); self._setCallbackInfo(self, PyPanel)"
+    %pythonAppend wxPyPanel         "self._setOORInfo(self);" setCallbackInfo(PyPanel)
     %pythonAppend wxPyPanel()       ""
 
     wxPyPanel(wxWindow* parent, const wxWindowID id=-1,
                const wxPoint& pos = wxDefaultPosition,
                const wxSize& size = wxDefaultSize,
-               long style = 0,
+               long style = wxTAB_TRAVERSAL | wxNO_BORDER,
                const wxString& name = wxPyPanelNameStr);
 
     %RenameCtor(PrePyPanel,  wxPyPanel());
 
     void _setCallbackInfo(PyObject* self, PyObject* _class);
 
-    void SetBestSize(const wxSize& size);
+    %pythoncode { SetBestSize = wx.Window.SetInitialSize }
     bool DoEraseBackground(wxDC* dc);
     
     void DoMoveWindow(int x, int y, int width, int height);
@@ -417,11 +415,10 @@ public:
     wxPyScrolledWindow(wxWindow* parent, const wxWindowID id,
                const wxPoint& pos = wxDefaultPosition,
                const wxSize& size = wxDefaultSize,
-               long style = 0,
+               long style = wxHSCROLL | wxVSCROLL,
                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());
@@ -505,20 +502,20 @@ MustHaveApp(wxPyScrolledWindow);
 class wxPyScrolledWindow : public wxScrolledWindow
 {
 public:
-    %pythonAppend wxPyScrolledWindow         "self._setOORInfo(self); self._setCallbackInfo(self, PyScrolledWindow)"
+    %pythonAppend wxPyScrolledWindow         "self._setOORInfo(self);" setCallbackInfo(PyScrolledWindow)
     %pythonAppend wxPyScrolledWindow()       ""
 
     wxPyScrolledWindow(wxWindow* parent, const wxWindowID id=-1,
                const wxPoint& pos = wxDefaultPosition,
                const wxSize& size = wxDefaultSize,
-               long style = 0,
+               long style = wxHSCROLL | wxVSCROLL,
                const wxString& name = wxPyPanelNameStr);
 
     %RenameCtor(PrePyScrolledWindow,  wxPyScrolledWindow());
 
     void _setCallbackInfo(PyObject* self, PyObject* _class);
 
-    void SetBestSize(const wxSize& size);
+    %pythoncode { SetBestSize = wx.Window.SetInitialSize }
     bool DoEraseBackground(wxDC* dc);
     
     void DoMoveWindow(int x, int y, int width, int height);