]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/choicbkg.cpp
Correct wxDataViewListModel::RowPrepended
[wxWidgets.git] / src / generic / choicbkg.cpp
index 057071f96ec4df0556294645864217755367bb47..dc93e2b29254981953bd4344f2cbd0afa9dec05a 100644 (file)
@@ -49,8 +49,8 @@
 
 IMPLEMENT_DYNAMIC_CLASS(wxChoicebook, wxBookCtrlBase)
 
-wxDEFINE_EVENT( wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING, wxBookCtrlEvent )
-wxDEFINE_EVENT( wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED,  wxBookCtrlEvent )
+wxDEFINE_EVENT( wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING, wxBookCtrlEvent );
+wxDEFINE_EVENT( wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED,  wxBookCtrlEvent );
 
 BEGIN_EVENT_TABLE(wxChoicebook, wxBookCtrlBase)
     EVT_CHOICE(wxID_ANY, wxChoicebook::OnChoiceSelected)
@@ -194,9 +194,9 @@ bool wxChoicebook::SetPageImage(size_t WXUNUSED(n), int WXUNUSED(imageId))
 
 void wxChoicebook::DoSetWindowVariant(wxWindowVariant variant)
 {
-    wxCHECK_RET( m_bookctrl, "can't be called before control creation" );
-
-    m_bookctrl->SetWindowVariant(variant);
+    wxBookCtrlBase::DoSetWindowVariant(variant);
+    if (m_bookctrl)
+        m_bookctrl->SetWindowVariant(variant);
 }
 
 void wxChoicebook::SetImageList(wxImageList *imageList)