User forums > General (but related to Code::Blocks)

wxSmith - wxToolBar message Identifiers

(1/1)

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.

Navigation

[0] Message Index

Go to full version