I'm working with wxBitmapToggleButton on my UI and I've come across a problem with it (version 3.0.1). I have two images, one for each state of the button (active/inactive) and it works pretty well. The problem is that I haven't defined images for focus or hover status, and if the button has the focus or mouse over it, the standard bitmap is shown (inactive), and it seems reasonable to me that the bitmap should be the corresponding with the activation of the button,
Searching on forums I've found this post: viewtopic.php?f=1&t=33023&p=137491&hili ... on#p161734 where someone suggest patching the library to address this problem.
Is this the best solution? Should I upgrade library to 3.1.0 ? Is there another solution like subclassing and write my own control?
Here i the relevant part of the code:
Code: Select all
m_toggle_Flipper1 = new wxBitmapToggleButton( m_scrolledWindow5, wxID_ANY, wxBitmap( wxT("../../Botones/boton_verde_ON_64.png"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxNO_BORDER );
m_toggle_Flipper1->SetBitmapSelected( wxBitmap( wxT("../../Botones/boton_verde_OFF_64.png"), wxBITMAP_TYPE_ANY ) );
m_toggle_Flipper1->SetBackgroundColour( wxColour( 93, 93, 93 ) );
R.