Added SetToolNormalBitmap and SetToolDisabledBitmap
(ported from 2.8 branch) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44388 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -597,6 +597,30 @@ void wxToolBar::SetToolShortHelp( int id, const wxString& helpString )
|
||||
}
|
||||
}
|
||||
|
||||
void wxToolBar::SetToolNormalBitmap( int id, const wxBitmap& bitmap )
|
||||
{
|
||||
wxToolBarTool* tool = wx_static_cast(wxToolBarTool*, FindById(id));
|
||||
if ( tool )
|
||||
{
|
||||
wxCHECK_RET( tool->IsButton(), wxT("Can only set bitmap on button tools."));
|
||||
|
||||
tool->SetNormalBitmap(bitmap);
|
||||
tool->SetImage(tool->GetBitmap());
|
||||
}
|
||||
}
|
||||
|
||||
void wxToolBar::SetToolDisabledBitmap( int id, const wxBitmap& bitmap )
|
||||
{
|
||||
wxToolBarTool* tool = wx_static_cast(wxToolBarTool*, FindById(id));
|
||||
if ( tool )
|
||||
{
|
||||
wxCHECK_RET( tool->IsButton(), wxT("Can only set bitmap on button tools."));
|
||||
|
||||
tool->SetDisabledBitmap(bitmap);
|
||||
tool->SetImage(tool->GetBitmap());
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxToolBar idle handling
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user