]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/fontpickercmn.cpp
update button style to include BS_MULTILINE when a multiline label is set
[wxWidgets.git] / src / common / fontpickercmn.cpp
index 92cf9898b69dbeeda5d1d0a16be99932afd88596..3ca7872f1d1c12e7af39e98f183264b9cde8d024 100644 (file)
@@ -39,6 +39,9 @@
 // implementation
 // ============================================================================
 
+const wxChar wxFontPickerCtrlNameStr[] = wxT("fontpicker");
+const wxChar wxFontPickerWidgetNameStr[] = wxT("fontpickerwidget");
+
 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 )
 {
-    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;