Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to deactivate a popup menu after a selection has been made? 2

Status
Not open for further replies.

Luiz Eduh

Technical User
Jan 10, 2012
51
US
I need some help from the experts. I currently using this popup menu;

Code:
DEFINE POPUP OUTPUT from 5,27 SHADOW ;
FONT 'LUCIDA SANS TYPEWRITER',12 STYLE 'B' TITLE 'Select an Option'
DEFINE BAR 1 OF OUTPUT PROMPT 'Send to Printer'
DEFINE BAR 2 OF OUTPUT PROMPT 'Convert to PDF'


ON selection BAR 1 OF OUTPUT DO prt2file
ON selection BAR 2 OF OUTPUT DO PRT2PDF
ACTIVATE POPUP OUTPUT

The above code works fine, but I would like to deactive the popup as soon as a selection bar is chosen by the user. What is doing now it runs the prg depending on the selection and menu stays on the screen, I have to press the escape key to get it out of the screen. Is there a way to make it go away once a selection is chosen?

Thanks
 
Yes, that should do it, but it's quite strange a context menu stays after you clicked an item of it. The two PRGs you start here (I assume it are PRGS and not APPs) seem to not let Windows events happen, which normally would clear the popup menu. So try to put DOEVENTS FORCE as start of the PRGs.

Bye, Olaf.
 
Aha, it's simpler than thought. You just need to DEFINE POPUP OUTPUT [highlight #FCE94F]SHORTCUT[/highlight] ...

The SHORTCUT option makes it a context menu popup, even though the normal position of that would be at mouse position and not styled the way you do, that option makes the popup disappear when you pick one of the options. That's all to it.

Bye, Olaf.
 
Hi Webuxer,

Here a simple code for you. I write this code to express my point of view. Please see the attached file. I can't write it here coz i'm not that good enough to used special effects in here, hehehe..., im sorry.

To Mike Lewis if you read this, sorry i dont explore yet your good clue on writing here.

happy sunday everyone...

best,

JunMagoncia
Manila,
Philippines
 
 http://files.engineering.com/getfile.aspx?folder=e449c3c3-84df-4fdb-8295-2f361f7b63e6&file=the_popup_menu_20170312.docx
Great!!

Thank you all for your help, I was able to accomplish what I wanted with your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top