Improve guards in button pages of widgets sample
Add guards for wxCommandLinkButton. Move CheckBoxes outside wxHAS_BITMAPTOGGLEBUTTON guard. Remove wxHAS_ANY_BUTTON check, this is always defined with wxUSE_TOGGLEBTN.
This commit is contained in:
@@ -456,7 +456,9 @@ void ButtonWidgetsPage::CreateButton()
|
||||
bool showsBitmap = false;
|
||||
if ( m_chkBitmapOnly->GetValue() )
|
||||
{
|
||||
#if wxUSE_COMMANDLINKBUTTON
|
||||
m_chkCommandLink->SetValue(false); // wxCommandLinkButton cannot be "Bitmap only"
|
||||
#endif
|
||||
|
||||
showsBitmap = true;
|
||||
|
||||
@@ -537,7 +539,9 @@ void ButtonWidgetsPage::CreateButton()
|
||||
|
||||
m_chkTextAndBitmap->Enable(!m_chkBitmapOnly->IsChecked());
|
||||
m_chkBitmapOnly->Enable(!m_chkTextAndBitmap->IsChecked());
|
||||
#if wxUSE_COMMANDLINKBUTTON
|
||||
m_chkCommandLink->Enable(!m_chkBitmapOnly->IsChecked());
|
||||
#endif
|
||||
m_chkUseBitmapClass->Enable(showsBitmap);
|
||||
|
||||
m_chkUsePressed->Enable(showsBitmap);
|
||||
|
Reference in New Issue
Block a user