Silverfrost Forums

Welcome to our forums

Constructing menus

15 May 2012 1:52 #10156

Is it possible to add second and higher level menu items after the menu has already been created? The following code, for example, creates a menu with a sub-menu, works on a second menu item, and then attempts to add a second sub-menu item to 'Menu1', but the program adds a second 'Menu1'.

MODULE m
CONTAINS
 FUNCTION f()
  INTEGER :: f
  f=0
 END FUNCTION f
END MODULE m

PROGRAM p
 WINAPP
 USE m
 iw=winio@('%mn[Menu1[Menu1.1]]&',f)
 iw=winio@('%mn[Menu2]&',f)
 iw=winio@('%mn[Menu1[Menu1.2]]',f)
END PROGRAM p

[/code]

15 May 2012 2:34 #10158

Take a look at the ClearWin+ routine called add_menu_item@.

Please login to reply.