corrected enabling of a specific item by index

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16663 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Gilles Depeyrot
2002-08-21 20:20:20 +00:00
parent 5d5d57f3ec
commit 371fd015a7
2 changed files with 70 additions and 64 deletions

View File

@@ -150,14 +150,14 @@ bool wxRadioBox::Enable(bool enable)
wxRadioButton *current;
if (!wxControl::Enable(enable))
return (false);
return false;
current = m_radioButtonCycle;
for (i = 0; i < m_noItems; i++) {
current->Enable(enable);
current = current->NextInCycle();
}
return (true);
return true;
}
//-------------------------------------------------------------------------------------
@@ -172,12 +172,14 @@ void wxRadioBox::Enable(int item, bool enable)
if ((item < 0) || (item >= m_noItems))
return;
i = 0;
current = m_radioButtonCycle;
while (i != item) {
i++;
current = current->NextInCycle();
}
current->Enable(enable);
}
//-------------------------------------------------------------------------------------
@@ -202,6 +204,7 @@ wxString wxRadioBox::GetString(int item) const
if ((item < 0) || (item >= m_noItems))
return wxString("");
i = 0;
current = m_radioButtonCycle;
while (i != item) {

View File

@@ -150,14 +150,14 @@ bool wxRadioBox::Enable(bool enable)
wxRadioButton *current;
if (!wxControl::Enable(enable))
return (false);
return false;
current = m_radioButtonCycle;
for (i = 0; i < m_noItems; i++) {
current->Enable(enable);
current = current->NextInCycle();
}
return (true);
return true;
}
//-------------------------------------------------------------------------------------
@@ -172,12 +172,14 @@ void wxRadioBox::Enable(int item, bool enable)
if ((item < 0) || (item >= m_noItems))
return;
i = 0;
current = m_radioButtonCycle;
while (i != item) {
i++;
current = current->NextInCycle();
}
current->Enable(enable);
}
//-------------------------------------------------------------------------------------
@@ -202,6 +204,7 @@ wxString wxRadioBox::GetString(int item) const
if ((item < 0) || (item >= m_noItems))
return wxString("");
i = 0;
current = m_radioButtonCycle;
while (i != item) {