DRAWMENU function. - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: HP Prime (/forum-5.html) +--- Thread: DRAWMENU function. (/thread-633.html) |
DRAWMENU function. - veeblefester - 02-07-2014 11:10 AM How can the menu buttons be used once DRAWMENU has assigned a string to them? Can one call a program by pecking a menu button? Can one assign some action to a button? Thanks in advance for any help. RE: DRAWMENU function. - Marcus von Cube - 02-09-2014 02:49 PM Here is on old thread about finding out about the menu key selected by the user. It's essentially a matter of interpreting the result of MOUSE(). RE: DRAWMENU function. - dg1969 - 02-09-2014 06:31 PM I hope that the future firmware add the ability to use soft menu outside a program as user-key to launch build-in or user function and program... RE: DRAWMENU function. - Giancarlo - 02-11-2014 07:14 AM Hello, i was just trying to write some code around the MOUSE and DRAWMENU commands but i have an errore i don't find. it seems my code is not able to cope with the menu area. the code is based on Les and Cirille codes. Why I am not able to detect the menu X position in order to understand which menu was pushed/clicked? Code:
Giancarlo RE: DRAWMENU function. - Damien - 02-11-2014 02:50 PM Hi, Giancarlo This code based on yours should work: Code:
Regards. Damien. RE: DRAWMENU function. - Han - 02-11-2014 06:17 PM (02-11-2014 07:14 AM)Giancarlo Wrote: Here is where you are guaranteed to run into issues. You cannot use an AND statement because the local variable l may OR MAY NOT be a list. If the WAIT(-1) command returns a mouse event, l is a list, and the AND statement works. But if WAIT(-1) times out or is returns a keyboard even, then l is a numeric value (not a list) and l(1) produces an error. Separate your code into two blocks: one that handles mouse events and the other to handle keyboard events. I recommend: Code:
RE: DRAWMENU function. - Giancarlo - 02-11-2014 08:40 PM Thanks guys; it works, bye Giancarlo |