Consultor Eletrônico



Kbase P59412: How to give focus to a menubar in character mode?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   17/02/2004
Status: Unverified

GOAL:

How to enter a menubar in character mode?

GOAL:

How to make active the menubar of character client?

GOAL:

How to apply focus to a menubar in character mode?

FIX:

Below is example code demonstrating how to give focus to the menubar.

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.