Page 1 of 1

Correct way to create hierarchical menus in toolbar?

Posted: Mon May 01, 2023 9:31 pm
by wbrisett
We're using the custom version of oXygen for web provided as part of the Ixiasoft product. By taking a few things I had done in oXygen standalone, I was able to make changes to the framework. However, I'm confused about one thing, that is, how do I change things so that the number.xxxx values are all grouped in the toolbar? These actions put them as individual items which I don't want. It it simply a matter for creating a parent item where all the options are then children of that item?

Current:

Code: Select all

      <toolbar>
        <separator/>
        <addAction id="insert.note"/>
        <addAction id="number.any"/>
        <addAction id="number.binary"/>
        <addAction id="number.hex"/>
        <removeAction id="bold"/>
        <removeAction id="underline"/>
        <removeAction id="italic"/>
      </toolbar>
What I want is all the number.any, number.binary, and number.hex all available in the toolbar but something like this (which may not work, but illustrates what I want).

Code: Select all

<toolbar>
<separator/>
        <addAction id="insert.note"/>
	<addAction id="number">
		<addAction id="number.any"/>
        	<addAction id="number.binary"/>
        	<addAction id="number.hex"/>
        </addAction>
        <removeAction id="bold"/>
        <removeAction id="underline"/>
        <removeAction id="italic"/>
      </toolbar>
Thanks!
Wayne

Re: Correct way to create hierarchical menus in toolbar?

Posted: Tue May 02, 2023 10:29 am
by Bogdan Dumitru
Hello Wayne,

To add actions in a separate group from a Framework Extension Script (.exf) try using the "group" element, like exemplified in the Framework Extension Script File documentation topic:

Code: Select all

<group name="New group">
  <addAction id="insert.note"/>
  <addAction id="insert.table"/>
</group>

Re: Correct way to create hierarchical menus in toolbar?

Posted: Mon May 08, 2023 5:20 pm
by wbrisett
Bogdan, thanks! I missed the <group> element when I looked at that. I do have a question though and I don't see it in the documentation. Is there a way with the group to add add an icon to that group? Right now in each individual actions there's an area to set an icon, I can't see anything in the documentation itself about this, but I would think there should be a way to do this, but I can't seem to find that.

Re: Correct way to create hierarchical menus in toolbar?

Posted: Tue May 09, 2023 10:34 am
by mihaela
Hello,

The group element has two attributes that refer to images: smallIconPath and largeIconPath. The first one is used in the toolbar, and the second one is in the menus. If you edit the exf in Oxygen XML Editor you can use the content completion to see the available attributes and elements.

Best Regards,
Mihaela