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
This commit is contained in:
Francesco Montorsi
2008-10-10 20:56:45 +00:00
parent dd72e7678d
commit 57ea89975e
3 changed files with 7 additions and 5 deletions

View File

@@ -577,7 +577,7 @@
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style">wxRB_GROUP</property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="tooltip">wxRadioButton</property> <property name="tooltip">wxRadioButton</property>
<property name="value">1</property> <property name="value">1</property>

View File

@@ -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 ); 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->SetValue( true );
m_radioBtn1->SetToolTip( _("wxRadioButton") ); m_radioBtn1->SetToolTip( _("wxRadioButton") );

View File

@@ -77,12 +77,14 @@ ScreenshotFrame::~ScreenshotFrame()
e.g. you cannot load a richtext file in a wxRichtextCtrl during initialization. e.g. you cannot load a richtext file in a wxRichtextCtrl during initialization.
Those customizations will be done here. 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() void ScreenshotFrame::InitFBControls()
{ {
// explicitely uncheck radio button:
m_radioBtn2->SetValue(false);
// For some reason, wxFormBuilder does not set the scrollbar range // For some reason, wxFormBuilder does not set the scrollbar range
m_scrollBar1->SetScrollbar(50, 1, 100, 1); m_scrollBar1->SetScrollbar(50, 1, 100, 1);