Here is presented a way to make a custom button on a custom menu allocating a macro name in X5
How is possible to do that in X8. Should we follow the same logic?
Yes is the same logic
Thanks!
But where to find DRAWUIConfig.xml to firstly make a backup? Or its equivalent for X8... In Workspace folder does not exist any folder and any xml file. Should I neglect this recommendation and just start creating the recommended files in Addons folder? Is it safe?
I was thinking to firstly create the files manually in Addons folder and in case it works, to write them by C# wouldn't be too difficult. But why is it necessary to (many times) reset workspace? What does that mean?
Should I update the workspace.xml file to refer my newly created files each time I check them? I thought corel will do that by itself at opening and finding something new in Addons folder... Like adding a docker. Is it something I am missing?
The link to the 'working example' for X5 doesn't work any more. Do you have such a working example for X8? Or for any version, if not X8?
Thanks in advance!
Flyout-menu.zip
This exemple will result like
I could easily understand and adapt the menu/buttons names but I cannot link them to existing macros.
I tried inserting dynamicCommand="GSM_Name.Module_Name.Sub_Name" in the button element but nothing happens when pressed...
Is it something different against X5 example? Is it something else to be add?
Two important tips, not use the attribute type
and use the attribute dynamicCategory="2cc24a3e-fe24-4708-9a74-9c75406eebcd"
<itemData userCaption="Menu 01" guid="4581B6AE-549A-4C52-8369-77F374F893D9" enable="true" dynamicCategory="2cc24a3e-fe24-4708-9a74-9c75406eebcd" dynamicCommand="Bonus.Macros.Macro1"/>
This is what I used but nothing happens. No macro is called:
1 2 3 4 5
<itemData userCaption="XML_Creator" guid="4581B6AE-549A-4C52-8369-77F374F893D9" dynamicCommand="XML_Creator.Applications.ShowFormXMLCreator" dynamicCategory="2cc24a3e-fe24-4708-9a74-9c75406eebcd" enable="true" type="button" />
Shell I delete type="button"?
yes, remove type="button" attribute
Yes, it did the trick...
One more thing to be clarified, please:
In both existing articles (the one for X5 posted above and one for X7 here) the xslt file setting where the custom controls would be added is named 'UserDraw.xslt'. In your example the file name is 'UserUI.xslt'. Is that specific to X8 and higher versions or what? Should it work also with the first name instead of the (tested) second?
I use the second name in X7 and works, but i never test the first
OK. I just wanted to know if you would know something on the issue. I will test that after solving my real project.
Thanks anyhow!