How can I use the popupMenuXY to construct a contextual menu with buttons and Cascade buttons having an icon as well as a text label?
This is done for the Gedi menu bar, but I am unable to find an example for the construction.
How to construct a popup Menu with Icons and text
- GerrieF
- Posts:11
- Joined: Tue Sep 29, 2020 1:57 am
How to construct a popup Menu with Icons and text
- gschijndel
- Posts:376
- Joined: Tue Jan 15, 2019 3:12 pm
Re: How to construct a popup Menu with Icons and text
There is a hidden feature, which makes it possible to set a 'popup' flag for child panels. If this flag is set the child panel is closed if a mouse click occurs outside the child panel.
Perhaps 3.18 contains an example using this 'popup' flag.
Perhaps 3.18 contains an example using this 'popup' flag.
- GerrieF
- Posts:11
- Joined: Tue Sep 29, 2020 1:57 am
Re: How to construct a popup Menu with Icons and text
Thank you for your reply to my post!gschijndel wrote: ↑ Mon Mar 29, 2021 1:28 pm There is a hidden feature, which makes it possible to set a 'popup' flag for child panels. If this flag is set the child panel is closed if a mouse click occurs outside the child panel.
Perhaps 3.18 contains an example using this 'popup' flag.
Can you tell me a little more about the hidden "popup" flag?
I am fairly new to OA and I am trying to construct a contextual menu for a client's CMS system based on Google Material design guidelines.
My problem is that I cannot add the icons to the buttons when I create the menu using "popupMenyXY".
Any help on this will greatly be appreciated.
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: How to construct a popup Menu with Icons and text
In the upcoming version 3.18 a new reference object (objects/popupMenu/MenuButton.pnl) is available which can open a popup menu with text and icon.
You can possibly wait for the release of 3.18 and then have a look at the new reference object.
Best Regards
Leopold Knipp
Senior Support Specialist
You can possibly wait for the release of 3.18 and then have a look at the new reference object.
Best Regards
Leopold Knipp
Senior Support Specialist
- GerrieF
- Posts:11
- Joined: Tue Sep 29, 2020 1:57 am
Re: How to construct a popup Menu with Icons and text
Good day Leopoldleoknipp wrote: ↑ Thu Apr 01, 2021 8:42 am In the upcoming version 3.18 a new reference object (objects/popupMenu/MenuButton.pnl) is available which can open a popup menu with text and icon.
You can possibly wait for the release of 3.18 and then have a look at the new reference object.
Best Regards
Leopold Knipp
Senior Support Specialist
Thank you for this reply.
Do you know when version 3.18 will be released?
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: How to construct a popup Menu with Icons and text
The release of 3.18 is planned for May 2021.
Information for the future releases you can find in the following pdf document:
https://www.winccoa.com/downloads/detai ... 14b76451d0
Best Regards
Leopold Knipp
Senior Support Specialist
Information for the future releases you can find in the following pdf document:
https://www.winccoa.com/downloads/detai ... 14b76451d0
Best Regards
Leopold Knipp
Senior Support Specialist
- emanuel.b
- Posts:1
- Joined: Wed Dec 17, 2014 10:13 am
Re: How to construct a popup Menu with Icons and text
Hello,
I was searching for something similiar too and found the solution with that "hidden feature" (see the windowFlags -> Popup below), see following snippet.
BR
Emanuel
I was searching for something similiar too and found the solution with that "hidden feature" (see the windowFlags -> Popup below), see following snippet.
Code: Select all
int x, y;
getValue(this, "position", x, y); // just an example ...
dyn_string dollars = makeDynString(); // whatever to pass ...
dyn_anytype da = makeDynAnytype(myModuleName(), "yourPanelToShow.xml", myPanelName(), "somePanelName",
x, y , 1.0, true, dollars, false, makeMapping("windowFlags", "Popup"));
dyn_anytype results;
childPanel(da, results);
Emanuel
- GerrieF
- Posts:11
- Joined: Tue Sep 29, 2020 1:57 am
Re: How to construct a popup Menu with Icons and text
emanuel.b wrote: ↑ Wed Apr 14, 2021 4:55 pm Hello,
I was searching for something similiar too and found the solution with that "hidden feature" (see the windowFlags -> Popup below), see following snippet.
BRCode: Select all
int x, y; getValue(this, "position", x, y); // just an example ... dyn_string dollars = makeDynString(); // whatever to pass ... dyn_anytype da = makeDynAnytype(myModuleName(), "yourPanelToShow.xml", myPanelName(), "somePanelName", x, y , 1.0, true, dollars, false, makeMapping("windowFlags", "Popup")); dyn_anytype results; childPanel(da, results);
Emanuel
This will work great if I create a child panel, thanks.
I will defiantly keep this in mind for the design.
- tpjctrl
- Posts:145
- Joined: Tue May 08, 2018 10:30 am
Re: How to construct a popup Menu with Icons and text
Thanks for this example Emanuel, the only issue with this solution when creating context menus is the fact that a click outside the child panel is required to close it, but that click in itself is a "wasted" click. For example, say you create a main menu with a few main buttons and each one of those opens a context menu created using the above code (so with the popup windowFlag). If you click on one of the main menu buttons, a popup / context menu panel is shown (with whatever you want in it, it can contain buttons with icons + text for example), but if you then click on another main menu button to navigate the main menu, the only thing that will happen is the previously open context menu closing. So you need to click again on the main menu button you've selected to "open" that one, then you need to click away outside the context menu to close it, click another main menu button to "open" that one and so on...So basically it now requires two clicks to operate the menu which is counter intuitive and something you don't get with the "built in" context menu available via popupMenuXY.emanuel.b wrote: ↑ Wed Apr 14, 2021 4:55 pm Hello,
I was searching for something similiar too and found the solution with that "hidden feature" (see the windowFlags -> Popup below), see following snippet.
BRCode: Select all
int x, y; getValue(this, "position", x, y); // just an example ... dyn_string dollars = makeDynString(); // whatever to pass ... dyn_anytype da = makeDynAnytype(myModuleName(), "yourPanelToShow.xml", myPanelName(), "somePanelName", x, y , 1.0, true, dollars, false, makeMapping("windowFlags", "Popup")); dyn_anytype results; childPanel(da, results);
Emanuel
Or is there a way to somehow bypass this behavior?