]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/radiobox.cpp
added UDP test (see #10717)
[wxWidgets.git] / src / msw / radiobox.cpp
index 9108095f9347df49a4308c796e3774f6e5d40b58..0bdcb7d346da92bbe5a1e4097230595d1c006d2c 100644 (file)
@@ -150,6 +150,11 @@ bool wxRadioBox::Create(wxWindow *parent,
     if ( !wxStaticBox::Create(parent, id, title, pos, size, style, name) )
         return false;
 
+    // the code elsewhere in this file supposes that either wxRA_SPECIFY_COLS
+    // or wxRA_SPECIFY_ROWS is set, ensure that this is indeed the case
+    if ( !(style & (wxRA_SPECIFY_ROWS | wxRA_SPECIFY_COLS)) )
+        style |= wxRA_SPECIFY_COLS;
+
 #if wxUSE_VALIDATORS
     SetValidator(val);
 #else
@@ -249,7 +254,7 @@ bool wxRadioBox::Create(wxWindow *parent,
 
 wxRadioBox::~wxRadioBox()
 {
-    m_isBeingDeleted = true;
+    SendDestroyEvent();
 
     delete m_radioButtons;
     if ( m_dummyHwnd )
@@ -457,7 +462,9 @@ void wxRadioBox::DoSetItemToolTip(unsigned int item, wxToolTip *tooltip)
     if ( tooltip != NULL )
         tooltip->Add(hwndRbtn);
     else // unset the tooltip
-        wxToolTip::Remove(hwndRbtn);
+        wxToolTip::Remove(hwndRbtn, 0, wxRect(0,0,0,0));
+        // the second parameter can be zero since it's ignored by Remove()
+        // as we pass a rect for which wxRect::IsEmpty()==true...
 }
 
 #endif // wxUSE_TOOLTIPS