News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

wxSmith - wxToolBar message Identifiers

Started by PaulS, March 16, 2008, 08:25:32 PM

Previous topic - Next topic

PaulS

I have some code with a menu with checked items and a toolbar with toolbaritems for the same checked items.  Following the wxWidgets sample samples/richtext.cpp I tried to set the Identifiers to the same value but wxSmith refuses (probably to prevent inadvertent duplicates). If I edit the code to make them the same all works well.  Could wxSmith just warn me of duplicates rather than outright forbidding them?

I am no expert in this area, I am just copying the one example I found.  Perhaps there is a better way to sync the ToolBar and Menu?

byo

This could be a problem - wxSmith and wxWidgets require uniqueness of ids in some cases - especially when dealing with XRC files.

Regards
   BYO

PaulS

OK, its easy enough to generate the toolbar manually.  Basically I just copied your code and placed it outside the generated section :D.  I don't use xrc files at this time so I'll face that issue later if I need to.