From 378b042b98ab36060ad0f1146819fbb791f0d541 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 25 Mar 2007 01:57:24 +0000 Subject: [PATCH] make wxNO_BORDER work with wxRadioBox (patch 1525406) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45049 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 4 ++++ src/gtk/radiobox.cpp | 6 ++++++ src/gtk1/radiobox.cpp | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/docs/changes.txt b/docs/changes.txt index f0db5e28aa..39627c09e5 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -118,6 +118,10 @@ wxMSW: - Corrected GetChecked() for events from checkable menu items (smanders) - Fixed popup menus under Windows NT 4 +wxGTK: + +- Fix wxNO_BORDER style for wxRadioBox (David Hart) + 2.8.3 ----- diff --git a/src/gtk/radiobox.cpp b/src/gtk/radiobox.cpp index 938fe515ca..e84d215469 100644 --- a/src/gtk/radiobox.cpp +++ b/src/gtk/radiobox.cpp @@ -253,6 +253,12 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title, m_widget = GTKCreateFrame(title); wxControl::SetLabel(title); + if ( HasFlag(wxNO_BORDER) ) + { + // If we don't do this here, the wxNO_BORDER style is ignored in Show() + gtk_frame_set_shadow_type(GTK_FRAME(m_widget), GTK_SHADOW_NONE); + } + // majorDim may be 0 if all trailing parameters were omitted, so don't // assert here but just use the correct value for it diff --git a/src/gtk1/radiobox.cpp b/src/gtk1/radiobox.cpp index f969e6e4d1..2f760c38cf 100644 --- a/src/gtk1/radiobox.cpp +++ b/src/gtk1/radiobox.cpp @@ -202,6 +202,11 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title, m_widget = gtk_frame_new(NULL); SetLabel(title); + if ( HasFlag(wxNO_BORDER) ) + { + // If we don't do this here, the wxNO_BORDER style is ignored in Show() + gtk_frame_set_shadow_type(GTK_FRAME(m_widget), GTK_SHADOW_NONE); + } // majorDim may be 0 if all trailing parameters were omitted, so don't // assert here but just use the correct value for it