]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/ribbon/ribbondemo.cpp
Add wxMouseEvent::GetColumnsPerAction().
[wxWidgets.git] / samples / ribbon / ribbondemo.cpp
index a3933a0b3dc92e10d29fb29ebe21c18bf194c108..7a326c8598e6814ebbf32d6c33805d70ae305710 100644 (file)
@@ -405,6 +405,11 @@ MyFrame::MyFrame()
         bar->AddButton(ID_CHANGE_TEXT1, wxT("One"), ribbon_xpm);
         bar->AddButton(ID_CHANGE_TEXT2, wxT("Two"), ribbon_xpm);
         bar->AddButton(ID_UI_CHANGE_TEXT_UPDATED, wxT("Zero"), ribbon_xpm);
         bar->AddButton(ID_CHANGE_TEXT1, wxT("One"), ribbon_xpm);
         bar->AddButton(ID_CHANGE_TEXT2, wxT("Two"), ribbon_xpm);
         bar->AddButton(ID_UI_CHANGE_TEXT_UPDATED, wxT("Zero"), ribbon_xpm);
+
+        //Also set the general disabled text colour:
+        wxRibbonArtProvider* artProvider = m_ribbon->GetArtProvider();
+        wxColour tColour = artProvider->GetColor(wxRIBBON_ART_BUTTON_BAR_LABEL_COLOUR);
+        artProvider->SetColor(wxRIBBON_ART_BUTTON_BAR_LABEL_DISABLED_COLOUR, tColour.MakeDisabled());
     }
     new wxRibbonPage(m_ribbon, wxID_ANY, wxT("Empty Page"), empty_xpm);
     {
     }
     new wxRibbonPage(m_ribbon, wxID_ANY, wxT("Empty Page"), empty_xpm);
     {
@@ -965,7 +970,7 @@ void MyFrame::OnColourGalleryButton(wxCommandEvent& evt)
         gallery->SetSelection(item);
 
         // Send an event to respond to the selection change
         gallery->SetSelection(item);
 
         // Send an event to respond to the selection change
-        wxRibbonGalleryEvent dummy(wxEVT_COMMAND_RIBBONGALLERY_SELECTED, gallery->GetId());
+        wxRibbonGalleryEvent dummy(wxEVT_RIBBONGALLERY_SELECTED, gallery->GetId());
         dummy.SetEventObject(gallery);
         dummy.SetGallery(gallery);
         dummy.SetGalleryItem(item);
         dummy.SetEventObject(gallery);
         dummy.SetGallery(gallery);
         dummy.SetGalleryItem(item);