Consistent wxWindow::Enable with wxRadioBox::Enable for control and its items. wxRadioBox of PalmOS. Little source cleaning.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2005-02-21 21:02:41 +00:00
parent 1814658d67
commit 1a87edf286
24 changed files with 381 additions and 268 deletions

View File

@@ -408,12 +408,13 @@ void wxRadioBox::SetFocus()
}
// Enable a specific button
void wxRadioBox::Enable(int item, bool enable)
bool wxRadioBox::Enable(int item, bool enable)
{
wxCHECK_RET( item >= 0 && item < GetCount(),
wxCHECK_MSG( item >= 0 && item < GetCount(), false,
wxT("invalid item in wxRadioBox::Enable()") );
::EnableWindow((*m_radioButtons)[item], enable);
return true;
}
// Show a specific button
@@ -477,7 +478,7 @@ wxSize wxRadioBox::GetTotalButtonSize(const wxSize& sizeBtn) const
int width = GetNumHor() * (sizeBtn.x + cx1) + cx1;
// Add extra space under the label, if it exists.
if (!wxControl::GetLabel().IsEmpty())
if (!wxControl::GetLabel().empty())
height += cy1/2;
// and also wide enough for its label
@@ -561,7 +562,7 @@ void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags)
y_offset += cy1;
// Add extra space under the label, if it exists.
if (!wxControl::GetLabel().IsEmpty())
if (!wxControl::GetLabel().empty())
y_offset += cy1/2;
int startX = x_offset;