ChUI Popup Menu

Posted by PapaLee on 26-Apr-2018 15:47

How does one enable a popup-menu that is associated with a fill-in in ChUI?

OE 10,2b, AIX

TIA!

Posted by Matt Gilarde on 01-May-2018 20:34

You need to set the widget's MENU-KEY attribute to indicate which key will display the popup menu. Here's how to set it to F10 but you can use almost any key.

assign cxa:menu-key in frame f1 = "F10".

All Replies

Posted by Patrick Tingen on 27-Apr-2018 15:51

Not sure what you mean by 'enable', from the user's perspective should work with shift-f10 I guess

Posted by PapaLee on 01-May-2018 17:34

By enable, I mean to make the menu visible and have focus so the user can interact with it.

I'm also trying to get it to work in Windows ChUI (v11.5.1, Windows 10).

Shift-F10 does not work. But thanks for the suggestion.

In this Q&D example, how is myPopup enabled and given focus?

define variable cxa as character no-undo.

define menu myPopup
   menu-item a label "A"
   menu-item b label "B".

define frame f1
   cxa
   with size-chars 50 by 10.

assign
   menu myPopup:popup-only = true
   cxa:popup-menu in frame f1 = menu myPopup:handle.

enable
   cxa
   with frame f1.

wait-for go, end-error of frame f1.

Posted by Matt Gilarde on 01-May-2018 20:34

You need to set the widget's MENU-KEY attribute to indicate which key will display the popup menu. Here's how to set it to F10 but you can use almost any key.

assign cxa:menu-key in frame f1 = "F10".

Posted by PapaLee on 02-May-2018 07:57

Thank you Matt, That did the trick..

This thread is closed