Open KeyWorksRW opened 4 years ago
The wxEVT_COMMAND_BUTTON_CLICKED must be processed for this to work, not wxEVT_BUTTON.
wxUiEditor uses this in the derived class for the GridBagItemBase dialog, and it does not use a stock id.
A better approach would probably be to create an abstract generator -- with a infobar_btn
type. This could support both stock and custom ids, as well as adding the wxEVT_COMMAND_BUTTON_CLICKED event handler. The wxInfoBar generator would need it's own type which would support infobar_btn
children. Code generation would simply be to generate infoBar->AddButon(...)
and if requested, infoBar->Bind(wxEVT_COMMAND_BUTTON_CLICKED, ...);
Description:
wxInfoBar allows for the addition of one or more buttons. We could support adding at least one button by providing a dropdown of stock ids. We would also need to add an event handler property to process
wxEVT_BUTTON
for each custom button id added.