Problem with Ribbonbar
Posted: Sun Mar 29, 2015 11:09 pm
Hello.
I have a question about the wxRibbonbar.
I have a "RibbonButtonBar" with three "RibbonButtons".
For these three "RibbonButtons" I had added the "Ribbonbutton_clicked" events.
I tested the events with a simple test: show a messagebox with different content. "A", "B", "C".
But if I click now on Button "A", I get always the messagebox with "C".
In other words: It doesn't matter which button I click, it always use the last added event --> That is currently the event with "C".
How can I fix that? Or what did I make wrong?
I have a question about the wxRibbonbar.
I have a "RibbonButtonBar" with three "RibbonButtons".
For these three "RibbonButtons" I had added the "Ribbonbutton_clicked" events.
I tested the events with a simple test: show a messagebox with different content. "A", "B", "C".
Code: Select all
void amsHauptfenster::OnARibbonbuttonClicked(wxRibbonButtonBarEvent& event)
{
wxMessageBox( "A", "A" );
}
void amsHauptfenster::OnBRibbonbuttonClicked(wxRibbonButtonBarEvent& event)
{
wxMessageBox( "B", "B" );
}
void amsHauptfenster::OnCRibbonbuttonClicked(wxRibbonButtonBarEvent& event)
{
wxMessageBox( "C", "C" );
}
In other words: It doesn't matter which button I click, it always use the last added event --> That is currently the event with "C".
How can I fix that? Or what did I make wrong?