Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Hull and Outfitting

Defining a Bar Menu Gadget

  • Last UpdatedNov 12, 2025
  • 1 minute read

A bar menu is defined within a form definition. The menu bar is created with the bar subcommand. Note that its name is ‘bar’: there can be only one bar menu on a form. Then you can use the bar’s Add() method to add the options. For example:

setup form !!MyForm Dialog size 30 5

 bar

 !this.bar.add ( 'Choose', 'Menu1')

 !this.bar.add ( 'Window', ' ' )

 !this.bar.add ( 'Help', ' ' )

exit

This code specifies the text of three options labelled Choose, Window, and Help.

Figure 16:1. A Simple Menu

  • The Choose option when picked will open Menu1 as a pull-down (assuming you have defined Menu1).

    Note: That Menu1 need not exist when the bar is defined, it can be defined later in the form definition, but it must exist before the Choose option is selected or an error alert will be raised.

  • The Window and Help options will open the Window and Help system menus (described later in this chapter).

TitleResults for “How to create a CRG?”Also Available in