foxGUIb

GUI Creator for Ruby + Fox

Guide Contents

Creating menus

Conventional menus

foxGUIb has a number of widgets to provide menus. Here is the tree for a menu bar with two menus: File and Edit.

The File menu has Open and Save, and The Edit menu has Cut, Copy and Paste.


MainWindow
    MenuBar
        MenuTitle   (set its text to File)
            MenuPane   (added automatically by foxGUIb)
                MenuCommandOpen
                MenuCommandSave

        MenuTitle   (set its text to Edit)
            MenuPane   (added automatically by foxGUIb)
                MenuCommandCut
                MenuCommandCopy
                MenuCommandPaste

    VerticalFrame
        etc...
Note:
  • The menu bar should be the first item inside MainWindow. In the above, the window holds a vertical frame, but this is lower than the menu.
  • When you add a menu title, foxGUIb automatically adds a pane. Do not add a pane directly. We can also add radio buttons, check buttons, etc Accelerators etc can be specified by & in the text. Other properties can also be manipulated.
  • Cascading menus can be created. Here is an example of a tree:
    
    MainWindow
        MenuBar
            MenuTitle   (set its text to File)
                MenuPane   (added automatically by foxGUIb)
                    MenuCommandOpen
                    MenuCommandSave
                    MenuCascade       (add inside Pane)
                        MenuCommandWhatEverYouWant
    
        VerticalFrame
            etc...
    

Pop-up Menus

...cannot be created currently in foxGUIb.

 


Guide Contents