Re: radiobox bug
Vadim Zeitlin <[email protected]> Mon, 26 Mar 2012 20:10:00 +0200
| Newsgroups | gmane.mail.mahogany.devel |
|---|---|
| Message-ID | <[email protected]> |
--===============1429014527725435443== Content-Type: MULTIPART/SIGNED; protocol="application/pgp-signature"; micalg=pgp-sha1; BOUNDARY="1565692573-41-1332785400=:5252" --1565692573-41-1332785400=:5252 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-Disposition: INLINE On Mon, 26 Mar 2012 19:23:20 +0300 Nerijus Baliunas <[email protected]> wrote: NB> Both choices are checked - please see attachments. I see the problem but am not sure what is the best way to fix it. For now you could apply diff --git a/src/wx/generic/persctrl.cpp b/src/wx/generic/persctrl.cpp index d5cbd76..a028ae5 100644 --- a/src/wx/generic/persctrl.cpp +++ b/src/wx/generic/persctrl.cpp @@ -1504,7 +1504,9 @@ wxPMessageDialog::wxPMessageDialog(wxWindow *parent, for ( size_t n = 0; n < m_countRadioBtns; n++ ) { m_radiobuttons[n] - = new wxRadioButton(this, -1, params.disableOptions[n]); + = new wxRadioButton(this, -1, params.disableOptions[n], + wxDefaultPosition, wxDefaultSize, + n == 0 ? wxRB_GROUP : 0); sizerOpts->Add(m_radiobuttons[n], 0, wxBOTTOM, LAYOUT_Y_MARGIN); if ( (int)n == params.indexDisable ) to M sources, this should definitely correct it. But, again, I'm not even sure if this is necessary. NB> I was not able to reproduce with wx controls sample. This code is M-specific but just the following allows to see the same kind of situation in the minimal sample: diff --git a/samples/minimal/minimal.cpp b/samples/minimal/minimal.cpp index a78e462..3c6715e 100644 --- a/samples/minimal/minimal.cpp +++ b/samples/minimal/minimal.cpp @@ -167,6 +167,9 @@ bool MyApp::OnInit() SetMenuBar(menuBar); #endif // wxUSE_MENUS + new wxRadioButton(this, -1, "First", wxPoint(5, 5)); + new wxRadioButton(this, -1, "Second", wxPoint(5, 55)); + #if wxUSE_STATUSBAR // create a status bar just for fun (by default with 1 pane only) CreateStatusBar(2); This fails in wxGTK but works in wxMSW, which is why I don't know if it shouldn't be fixed in wx instead. Anyhow, thanks for reporting, VZ --1565692573-41-1332785400=:5252 Content-Type: APPLICATION/PGP-SIGNATURE -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) iEYEABECAAYFAk9wsPgACgkQBupB3k9sHobftQCfRUAx5BoaIopQjNSJnSo2fF23 yMQAn1ZOyza3c4TpOPozEC2RqB0e+dxE =vRFC -----END PGP SIGNATURE----- --1565692573-41-1332785400=:5252-- --===============1429014527725435443== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure --===============1429014527725435443== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Mahogany-Developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mahogany-developers --===============1429014527725435443==--