From 57ea89975efa3d98d6a641366adf269162755bd7 Mon Sep 17 00:00:00 2001 From: Francesco Montorsi Date: Fri, 10 Oct 2008 20:56:45 +0000 Subject: [PATCH 1/1] fixed the status of the second radio button; now (on wxGTK at least) it appears correctly as unchecked git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56221 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- utils/screenshotgen/src/guidesign.fbp | 2 +- utils/screenshotgen/src/guiframe.cpp | 2 +- utils/screenshotgen/src/screenshot_main.cpp | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/utils/screenshotgen/src/guidesign.fbp b/utils/screenshotgen/src/guidesign.fbp index 00e0a5b4f7..6cb2d47a4b 100644 --- a/utils/screenshotgen/src/guidesign.fbp +++ b/utils/screenshotgen/src/guidesign.fbp @@ -577,7 +577,7 @@ protected - + wxRB_GROUP wxRadioButton 1 diff --git a/utils/screenshotgen/src/guiframe.cpp b/utils/screenshotgen/src/guiframe.cpp index 5f1b4ddd0e..5244014005 100644 --- a/utils/screenshotgen/src/guiframe.cpp +++ b/utils/screenshotgen/src/guiframe.cpp @@ -116,7 +116,7 @@ GUIFrame::GUIFrame( wxWindow* parent, wxWindowID id, const wxString& title, cons fgSizer1->Add( m_checkBox2, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 20 ); - m_radioBtn1 = new wxRadioButton( m_panel1, wxID_ANY, _("Checked"), wxDefaultPosition, wxDefaultSize, 0 ); + m_radioBtn1 = new wxRadioButton( m_panel1, wxID_ANY, _("Checked"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); m_radioBtn1->SetValue( true ); m_radioBtn1->SetToolTip( _("wxRadioButton") ); diff --git a/utils/screenshotgen/src/screenshot_main.cpp b/utils/screenshotgen/src/screenshot_main.cpp index a8697bdbae..02c3ef5375 100644 --- a/utils/screenshotgen/src/screenshot_main.cpp +++ b/utils/screenshotgen/src/screenshot_main.cpp @@ -77,12 +77,14 @@ ScreenshotFrame::~ScreenshotFrame() e.g. you cannot load a richtext file in a wxRichtextCtrl during initialization. Those customizations will be done here. + + + NB: under wxGTK for the radio button "unchecked" to be unchecked, it's + important to put the wxRB_GROUP style on the first wxRadioButton + (the one "checked") and no flags on the second one. */ void ScreenshotFrame::InitFBControls() { - // explicitely uncheck radio button: - m_radioBtn2->SetValue(false); - // For some reason, wxFormBuilder does not set the scrollbar range m_scrollBar1->SetScrollbar(50, 1, 100, 1); -- 2.45.2