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:
Maarten Bent
2019-01-31 20:12:23 +01:00
parent 8f3b87dce7
commit bf0a8ffd74
2 changed files with 27 additions and 24 deletions

View File

@@ -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);