How to construct a popup Menu with Icons and text

Find and share HowTos to various installations / configurations!
Search

Post Reply
9 posts • Page 1 of 1
GerrieF
Posts: 8
Joined: Tue Sep 29, 2020 1:57 am

How to construct a popup Menu with Icons and text

Post by GerrieF »

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.

gschijndel
Posts: 210
Joined: Tue Jan 15, 2019 3:12 pm

Re: How to construct a popup Menu with Icons and text

Post by gschijndel »

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.

GerrieF
Posts: 8
Joined: Tue Sep 29, 2020 1:57 am

Re: How to construct a popup Menu with Icons and text

Post by GerrieF »

Thank you for your reply to my post!
Last edited by GerrieF on Wed Mar 31, 2021 12:15 am, edited 1 time in total.

GerrieF
Posts: 8
Joined: Tue Sep 29, 2020 1:57 am

Re: How to construct a popup Menu with Icons and text

Post by GerrieF »

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.
Thank you for your reply to my post!

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.

User avatar
leoknipp
Posts: 2567
Joined: Tue Aug 24, 2010 7:28 pm

Re: How to construct a popup Menu with Icons and text

Post by leoknipp »

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

GerrieF
Posts: 8
Joined: Tue Sep 29, 2020 1:57 am

Re: How to construct a popup Menu with Icons and text

Post by GerrieF »

leoknipp 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
Good day Leopold
Thank you for this reply.
Do you know when version 3.18 will be released?

User avatar
leoknipp
Posts: 2567
Joined: Tue Aug 24, 2010 7:28 pm

Re: How to construct a popup Menu with Icons and text

Post by leoknipp »

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

emanuel.b
Posts: 1
Joined: Wed Dec 17, 2014 10:13 am

Re: How to construct a popup Menu with Icons and text

Post by emanuel.b »

Hello,

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);
BR
Emanuel

GerrieF
Posts: 8
Joined: Tue Sep 29, 2020 1:57 am

Re: How to construct a popup Menu with Icons and text

Post by GerrieF »

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.


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);
BR
Emanuel

This will work great if I create a child panel, thanks.
I will defiantly keep this in mind for the design.

Post Reply
9 posts • Page 1 of 1