]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/fontpickercmn.cpp
rename wxHeaderCtrl DRAG events into RESIZE ones as we're also going to have column...
[wxWidgets.git] / src / common / fontpickercmn.cpp
index 92cf9898b69dbeeda5d1d0a16be99932afd88596..cc1dd50bbe9e4d276ec1712cb4f141c3f5f25432 100644 (file)
@@ -39,6 +39,9 @@
 // implementation
 // ============================================================================
 
 // implementation
 // ============================================================================
 
+const char wxFontPickerCtrlNameStr[] = "fontpicker";
+const char wxFontPickerWidgetNameStr[] = "fontpickerwidget";
+
 DEFINE_EVENT_TYPE(wxEVT_COMMAND_FONTPICKER_CHANGED)
 IMPLEMENT_DYNAMIC_CLASS(wxFontPickerCtrl, wxPickerBase)
 IMPLEMENT_DYNAMIC_CLASS(wxFontPickerEvent, wxCommandEvent)
 DEFINE_EVENT_TYPE(wxEVT_COMMAND_FONTPICKER_CHANGED)
 IMPLEMENT_DYNAMIC_CLASS(wxFontPickerCtrl, wxPickerBase)
 IMPLEMENT_DYNAMIC_CLASS(wxFontPickerEvent, wxCommandEvent)
@@ -55,7 +58,9 @@ bool wxFontPickerCtrl::Create( wxWindow *parent, wxWindowID id,
                         long style, const wxValidator& validator,
                         const wxString &name )
 {
                         long style, const wxValidator& validator,
                         const wxString &name )
 {
-    if (!wxPickerBase::CreateBase(parent, id, Font2String(initial),
+    if (!wxPickerBase::CreateBase(parent, id,
+                                  Font2String(initial.IsOk() ? initial
+                                                             : *wxNORMAL_FONT),
                                   pos, size, style, validator, name))
         return false;
 
                                   pos, size, style, validator, name))
         return false;