X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4b5f3fe655deeb91d5d3abe8fad30c4a1cae63dc..a66fa4a84b405396d522106e5bbc9735889f5a02:/samples/tab/test.cpp diff --git a/samples/tab/test.cpp b/samples/tab/test.cpp index 734025be6c..1c2f6fd553 100644 --- a/samples/tab/test.cpp +++ b/samples/tab/test.cpp @@ -24,7 +24,7 @@ #include "test.h" // If 1, use a dialog. Otherwise use a frame. -#define USE_TABBED_DIALOG 0 +#define USE_TABBED_DIALOG 1 MyDialog* dialog = (MyDialog *) NULL; MyFrame* frame = (MyFrame *) NULL; @@ -50,9 +50,6 @@ bool MyApp::OnInit(void) void MyApp::InitTabView(wxPanelTabView* view, wxWindow* window) { - int dialogWidth = 365; - int dialogHeight = 390; - m_okButton = new wxButton(window, wxID_OK, "Close", wxPoint(-1, -1), wxSize(80, 25)); m_cancelButton = new wxButton(window, wxID_CANCEL, "Cancel", wxPoint(-1, -1), wxSize(80, 25)); m_helpButton = new wxButton(window, wxID_HELP, "Help", wxPoint(-1, -1), wxSize(80, 25)); @@ -210,9 +207,6 @@ void MyFrame::OnCloseWindow(wxCloseEvent& WXUNUSED(event) ) void MyFrame::Init(void) { - int dialogWidth = 365; - int dialogHeight = 390; - m_panel = new wxTabbedPanel(this, -1); // Note, omit the wxTAB_STYLE_COLOUR_INTERIOR, so we will guarantee a match @@ -246,7 +240,7 @@ void MyFrame::OnSize(wxSizeEvent& event) m_view->SetViewRect(rect); - m_view->Layout(); + m_view->LayoutTabs(); // Need to do it a 2nd time to get the tab height with // the new view width @@ -258,7 +252,7 @@ void MyFrame::OnSize(wxSizeEvent& event) m_view->SetViewRect(rect); - m_view->Layout(); + m_view->LayoutTabs(); // Move all the panels to the new view position and size wxNode* node = m_view->GetWindows().First();