There are 4 ways to set Window IDS:
1) Select the ID from the dropdown list
2) Use XRCID so instead of typing MY_ID, type: XRCID("MY_ID")
3) Use custom header file with all your IDs, and include this header by selecting the top level item in the wxCrafter view and add it to the 'Additional include headers' - so wxCrafter will include it while generating the code
4) (
and this is what you are looking for) Click on the top level item in the tree view of wxCrafter and in its properties, select 'Generate Window ID' to True and just type your ID: MY_ID the generated codelite will include a enum with all your IDs
See this screenshot:
1.png
Here is an example of the generated code:
Code: Select all
class MainDialogBaseClass : public wxDialog
{
protected:
enum {
ID_BUTTON1 = 1003,
ID_BUTTON2 = 1004,
ID_BUTTON3 = 1005,
};
protected:
wxBoxSizer* mainSizer;
wxPanel* m_panel69;
wxBoxSizer* boxSizer71;
wxRibbonBar* m_ribbonBar;
...
Eran
You do not have the required permissions to view the files attached to this post.