HTBasic Help
×
Menu
Index

Creating Pulldown Menus (continued)

 
Step 4: Program the Parts (continued)
 
Create PullDown_1 Menu
 
The following lines create a MENU SEPARATOR widget and two CASCADE MENU widgets. The MENU SEPARATOR widgets keeps the MENU BUTTON visually distinct from the CASCADE MENU widgets below it. The MENU SEPARATOR is created like all other widgets and draws a line through the pulldown menu. These lines produce the following display.
 
1290   ! ****************************************************
1300   !
1310   ! Create menu for "PullDown_1" (using @Pd1 as PARENT).
1320   !
1330   S$="Button_1"
1340   ASSIGN @B11 TO WIDGET "MENU BUTTON";PARENT @Pd1,SET ("LABEL":S$)
1350   !
1360   ! Add menu separator.
1370   !
1380   ASSIGN @S12 TO WIDGET "MENU SEPARATOR";PARENT @Pd1
1390   !
1400   ! Add CASCADE MENU widgets to "PullDown_1" (using @Pd1 as PARENT).
1410   !
1420   S$="Cascade_1"
1430   ASSIGN @C13 TO WIDGET "CASCADE MENU";PARENT @Pd1,SET ("LABEL":S$)
1440   !
1450   S$="Cascade_2"
1460   ASSIGN @C14 TO WIDGET "CASCADE MENU";PARENT @Pd1,SET ("LABEL":S$)
1470   !
 
                             PullDown_1 Menu (CASCADE MENUs) Display