Menu Buttons
"Jean Gidcumb" <[email protected]> Thu, 20 Jul 2006 14:32:10 -0400
| Newsgroups | gmane.comp.lang.4gl.fourjs.user |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I am working on changing our application menu from an input array to
buttons on a form. One thing I have done is to create a form with the
following:
BUTTON aa0 : bt1, TEXT="None",
SIZEPOLICY=fixed;
BUTTON aa1 : bt2, TEXT="None",
SIZEPOLICY=fixed;
BUTTON aa2 : bt3, TEXT="None",
SIZEPOLICY=fixed;
Then I created a function with a menu, see the code below. I am hiding
buttons that are not being used. This works fine, when I click on a
button it allows me to got the next menu options or select a program to
run.
In the current program there is a function that when you press "F9" a
window displays showing the program information, name, path, etc. Is
there a way I set the focus on the Button, so if a user right clicks on
the button that the program window will be displayed.
Or is there another approach to this problem?
Thanks,
Jean Gidcumb
MENU "BUTTON"
BEFORE MENU
LET i = 1
FOR i = 1 to 15
LET l_button = "bt"
LET i_char = i
LET l_button = l_button clipped,i_char clipped
CALL unhide_button(l_button)
END FOR
IF p_total_options < 15 THEN
LET i = p_total_options + 1
FOR j = i to 15
LET l_button = "bt"
LET i_char = j
LET l_button = l_button clipped,i_char clipped
CALL hide_button(l_button)
END FOR
END IF
COMMAND "bt1"
LET p_selection = ga_menu[1].option_name
EXIT MENU
COMMAND "bt2"
LET p_selection = ga_menu[2].option_name
EXIT MENU
COMMAND "bt3"
LET p_selection = ga_menu[3].option_name
EXIT MENU
END MENU