]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/toolbar/test.cpp
Added a bit of libJPEG 6.0b
[wxWidgets.git] / samples / toolbar / test.cpp
index 298851bbc735072936e7937f3acc6d6d05a5e34b..889c478a13418478cbd4b657fb8dcdad13dba792 100644 (file)
@@ -70,7 +70,7 @@ bool MyApp::OnInit(void)
   frame->SetMenuBar(menuBar);
 
   // Create the toolbar
-  frame->CreateToolBar(wxNO_BORDER|wxHORIZONTAL|wxTB_FLAT|wxTB_DOCKABLE, ID_TOOLBAR);
+  frame->CreateToolBar(wxNO_BORDER|wxTB_HORIZONTAL|wxTB_FLAT|wxTB_DOCKABLE, ID_TOOLBAR);
   
   frame->GetToolBar()->SetMargins( 2, 2 );
 
@@ -140,6 +140,8 @@ bool MyApp::InitToolbar(wxToolBar* toolBar)
   currentX += width + 5;
   toolBar->AddSeparator();
   toolBar->AddTool(wxID_HELP, *(toolBarBitmaps[7]), wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, "Help");
+  
+  toolBar->EnableTool( wxID_PRINT, FALSE );
 
   toolBar->Realize();
 
@@ -158,7 +160,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
     EVT_MENU(wxID_HELP, MyFrame::OnAbout)
     EVT_CLOSE(MyFrame::OnCloseWindow)
     EVT_TOOL_RANGE(wxID_OPEN, wxID_PASTE, MyFrame::OnToolLeftClick)
-    EVT_TOOL_ENTER(wxID_OPEN, MyFrame::OnToolEnter)
+    EVT_TOOL_ENTER(ID_TOOLBAR, MyFrame::OnToolEnter)
 END_EVENT_TABLE()
 
 // Define my frame constructor