]> git.saurik.com Git - wxWidgets.git/commitdiff
Not sure how important that is, but now you
authorRobert Roebling <robert@roebling.de>
Sat, 3 Jul 2004 16:28:22 +0000 (16:28 +0000)
committerRobert Roebling <robert@roebling.de>
Sat, 3 Jul 2004 16:28:22 +0000 (16:28 +0000)
    can set the font of a static box.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28158 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/gtk/statbox.h
include/wx/gtk1/statbox.h
src/gtk/statbox.cpp
src/gtk1/statbox.cpp

index 2bedf27d46e760b227bc5b68ae3ee441e4bc31e8..b63c97324eeb8369d527e06af488a867cbb426ee 100644 (file)
@@ -40,6 +40,8 @@ public:
 
     virtual void SetLabel( const wxString &label );
 
+    bool SetFont( const wxFont &font );
+    
     static wxVisualAttributes
     GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
 
index 2bedf27d46e760b227bc5b68ae3ee441e4bc31e8..b63c97324eeb8369d527e06af488a867cbb426ee 100644 (file)
@@ -40,6 +40,8 @@ public:
 
     virtual void SetLabel( const wxString &label );
 
+    bool SetFont( const wxFont &font );
+    
     static wxVisualAttributes
     GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
 
index 7c3eb9678ee91cdea241dfb38a7121f90fe2cd64..a15681c0619017a1649d623c47a3340641d12c92 100644 (file)
@@ -91,6 +91,21 @@ void wxStaticBox::SetLabel( const wxString &label )
                          m_label.empty() ? (char *)NULL : (const char*) wxGTK_CONV( m_label ) );
 }
 
+bool wxStaticBox::SetFont( const wxFont &font )
+{
+    wxControl::SetFont( font );
+
+    if (GTK_FRAME(m_widget)->label_widget)
+    {
+        GtkRcStyle *style = CreateWidgetStyle(true);
+        if ( style )
+        {
+            gtk_widget_modify_style( GTK_FRAME(m_widget)->label_widget, style);
+            gtk_rc_style_unref(style);
+        }
+    }
+}
+
 // static
 wxVisualAttributes
 wxStaticBox::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
index 7c3eb9678ee91cdea241dfb38a7121f90fe2cd64..a15681c0619017a1649d623c47a3340641d12c92 100644 (file)
@@ -91,6 +91,21 @@ void wxStaticBox::SetLabel( const wxString &label )
                          m_label.empty() ? (char *)NULL : (const char*) wxGTK_CONV( m_label ) );
 }
 
+bool wxStaticBox::SetFont( const wxFont &font )
+{
+    wxControl::SetFont( font );
+
+    if (GTK_FRAME(m_widget)->label_widget)
+    {
+        GtkRcStyle *style = CreateWidgetStyle(true);
+        if ( style )
+        {
+            gtk_widget_modify_style( GTK_FRAME(m_widget)->label_widget, style);
+            gtk_rc_style_unref(style);
+        }
+    }
+}
+
 // static
 wxVisualAttributes
 wxStaticBox::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))