]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/toolbar/toolbar.cpp
added wxGetTopLevelParent()
[wxWidgets.git] / samples / toolbar / toolbar.cpp
index 6afda235145ccb31883de4e96b0e997dcce0105f..77e6ad964bc023d2465f6c2a0c3abe912c1a82af 100644 (file)
@@ -152,7 +152,8 @@ private:
 
 const int ID_TOOLBAR = 500;
 
 
 const int ID_TOOLBAR = 500;
 
-static const long TOOLBAR_STYLE = wxNO_BORDER | wxTB_FLAT | wxTB_DOCKABLE;
+static const long TOOLBAR_STYLE = wxTB_FLAT | wxTB_DOCKABLE | wxTB_TEXT ;
+// static const long TOOLBAR_STYLE = 0;
 
 enum
 {
 
 enum
 {
@@ -227,7 +228,7 @@ bool MyApp::OnInit()
     // Create the main frame window
     MyFrame* frame = new MyFrame((wxFrame *) NULL, -1,
                                  "wxToolBar Sample",
     // Create the main frame window
     MyFrame* frame = new MyFrame((wxFrame *) NULL, -1,
                                  "wxToolBar Sample",
-                                 wxPoint(100, 100), wxSize(450, 300));
+                                 wxPoint(100, 100), wxSize(550, 300));
 
     frame->Show(TRUE);
 
 
     frame->Show(TRUE);
 
@@ -397,6 +398,8 @@ MyFrame::MyFrame(wxFrame* parent,
     // Associate the menu bar with the frame
     SetMenuBar(menuBar);
 
     // Associate the menu bar with the frame
     SetMenuBar(menuBar);
 
+    menuBar->Check(IDM_TOOLBAR_SHOW_BOTH, TRUE);
+
     // Create the toolbar
     RecreateToolbar();
 }
     // Create the toolbar
     RecreateToolbar();
 }
@@ -464,8 +467,8 @@ void MyFrame::OnToggleAnotherToolbar(wxCommandEvent& WXUNUSED(event))
                                style);
 
         m_tbar->AddRadioTool(wxID_NEW, _T("First"), wxBITMAP(new));
                                style);
 
         m_tbar->AddRadioTool(wxID_NEW, _T("First"), wxBITMAP(new));
-        m_tbar->AddRadioTool(wxID_NEW, _T("Second"), wxBITMAP(new));
-        m_tbar->AddRadioTool(wxID_NEW, _T("Third"), wxBITMAP(new));
+        m_tbar->AddRadioTool(wxID_OPEN, _T("Second"), wxBITMAP(open));
+        m_tbar->AddRadioTool(wxID_SAVE, _T("Third"), wxBITMAP(save));
         m_tbar->AddSeparator();
         m_tbar->AddTool(wxID_HELP, _T("Help"), wxBITMAP(help));
 
         m_tbar->AddSeparator();
         m_tbar->AddTool(wxID_HELP, _T("Help"), wxBITMAP(help));