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:
@@ -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) {
|
||||
|
@@ -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) {
|
||||
|
Reference in New Issue
Block a user