- m_button = new wxButton(this, ButtonPage_Button, label,
- wxDefaultPosition, wxDefaultSize,
- flags);
+ const bool isBitmapButton = m_chkBitmap->GetValue();
+ if ( isBitmapButton )
+ {
+ wxBitmapButton *bbtn = new wxBitmapButton(this, ButtonPage_Button,
+ CreateBitmap(_T("normal")));
+ if ( m_chkUseSelected->GetValue() )
+ bbtn->SetBitmapSelected(CreateBitmap(_T("pushed")));
+ if ( m_chkUseFocused->GetValue() )
+ bbtn->SetBitmapFocus(CreateBitmap(_T("focused")));
+ if ( m_chkUseHover->GetValue() )
+ bbtn->SetBitmapHover(CreateBitmap(_T("hover")));
+ if ( m_chkUseDisabled->GetValue() )
+ bbtn->SetBitmapDisabled(CreateBitmap(_T("disabled")));
+ m_button = bbtn;
+ }
+ else // normal button
+ {
+ m_button = new wxButton(this, ButtonPage_Button, label,
+ wxDefaultPosition, wxDefaultSize,
+ flags);
+ }
+
+ m_chkUseSelected->Enable(isBitmapButton);
+ m_chkUseFocused->Enable(isBitmapButton);
+ m_chkUseHover->Enable(isBitmapButton);
+ m_chkUseDisabled->Enable(isBitmapButton);