Implement IsItemShown and IsItemEnabled.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49544 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -181,6 +181,22 @@ bool wxRadioBox::Enable(unsigned int item, bool enable)
|
||||
return current->Enable( enable );
|
||||
}
|
||||
|
||||
bool wxRadioBox::IsItemEnabled(unsigned int item) const
|
||||
{
|
||||
if (!IsValid( item ))
|
||||
return false;
|
||||
|
||||
unsigned int i = 0;
|
||||
wxRadioButton *current = m_radioButtonCycle;
|
||||
while (i != item)
|
||||
{
|
||||
i++;
|
||||
current = current->NextInCycle();
|
||||
}
|
||||
|
||||
return current->IsEnabled();
|
||||
}
|
||||
|
||||
// Returns the radiobox label
|
||||
//
|
||||
wxString wxRadioBox::GetLabel() const
|
||||
@@ -309,6 +325,23 @@ bool wxRadioBox::Show(unsigned int item, bool show)
|
||||
return current->Show( show );
|
||||
}
|
||||
|
||||
bool wxRadioBox::IsItemShown(unsigned int item) const
|
||||
{
|
||||
if (!IsValid( item ))
|
||||
return false;
|
||||
|
||||
unsigned int i = 0;
|
||||
wxRadioButton *current = m_radioButtonCycle;
|
||||
while (i != item)
|
||||
{
|
||||
i++;
|
||||
current = current->NextInCycle();
|
||||
}
|
||||
|
||||
return current->IsShown();
|
||||
}
|
||||
|
||||
|
||||
// Simulates the effect of the user issuing a command to the item
|
||||
//
|
||||
void wxRadioBox::Command( wxCommandEvent& event )
|
||||
|
Reference in New Issue
Block a user