Consultor Eletrônico



Kbase 16315: How to enter a menubar in character mode ENTER-MENUBAR
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/05/1998
How to enter a menubar in character mode ENTER-MENUBAR

How to apply entry to a menubar in character mode (usually F3)
--------------------------------------------------------------

If you are using Version 6 application-driven code such as UPDATE
EDITING, then applying entry to current-window will put the focus
on the menubar. Then, after a menu-item has been selected, you have
to apply entry back to the fill-in which is being edited. Try the
following code:

def var c as char.
def var b as char.
def var a as char.
def frame f a b c.
def var save-hdl as handle.
def sub-menu mn
menu-item m-one label "one".
def menu mnn menubar
sub-menu mn.

current-window:menubar = menu mnn:handle.

on choose of menu-item m-one in menu mnn
do:
message "menu-item m-one" view-as alert-box.
apply "entry" to save-hdl.
end.

update a b c with frame f editing:
readkey.
if keylabel(lastkey) = "F3" then do:
save-hdl = focus:handle.
apply "entry" to current-window.
end.
apply lastkey.
end.

References:
V8 Programming Handbook page 21-3
V7 Programming Handbook page 20-3

Progress Software Technical Support Note # 16315