]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied [ 585322 ] motif border style fix for statictext
authorJulian Smart <julian@anthemion.co.uk>
Wed, 11 Sep 2002 19:25:00 +0000 (19:25 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Wed, 11 Sep 2002 19:25:00 +0000 (19:25 +0000)
Applied fix to broken wxStaticText

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

include/wx/motif/stattext.h
src/motif/stattext.cpp

index c58bcaa7cc8df4975ae16c3927beb1cc2fdd85e3..e64de49452fe6217960f5951d6f05a288be44d7f 100644 (file)
@@ -56,6 +56,13 @@ public:
     virtual void ChangeFont(bool keepOriginalSize = TRUE);
     virtual void ChangeBackgroundColour();
     virtual void ChangeForegroundColour();
+    
+    // Get the widget that corresponds to the label (for font setting, label setting etc.)
+    virtual WXWidget GetLabelWidget() const
+        { return m_labelWidget; }
+    
+protected:
+    WXWidget              m_labelWidget;
 };
 
 #endif
index 742fa52c7612a3dd8994607dd217e98b4ff5f173..2b4166a75a4e7144498377a7b65f50faeae4f9bf 100644 (file)
@@ -106,7 +106,7 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id,
     
     XmFontList fontList = (XmFontList) m_font.GetFontList(1.0, XtDisplay(parentWidget));
 
-    Widget labelWidget = XtVaCreateManagedWidget ((char*) (const char*) name,
+    m_labelWidget = XtVaCreateManagedWidget ((char*) (const char*) name,
                                          xmLabelWidgetClass,
                                          borderWidget ? borderWidget : parentWidget,
                                          XmNfontList, fontList,
@@ -119,7 +119,7 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id,
 
     XmStringFree (text);
 
-    m_mainWidget = borderWidget ? borderWidget : labelWidget;
+    m_mainWidget = borderWidget ? borderWidget : m_labelWidget;
 
     SetCanAddEventHandler(TRUE);
     AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, size.x, size.y);