MenuBar Control

 

A MENUBAR is a horizontal bar that appears at the top of your dialog just below the title bar.  A menu bar contains menu items.  Generally, menu items displayed in the menu bar cause drop-down menus to be displayed when selected by the user.

WIL Dialogs support both drop down and context menus.  The WIL Dialog Menu Editor is now provided with the WIL Dialog Editor to help design the menu structure.

Return Value:

The MENUBAR control requires a Dialog Callback Procedure to handle the users selections. The easiest way to accomplish this is:

  • To highlight the entire WIL Dialog code in WinBatch Studio.

  • Right-click then select 'Code Blocks | Create Dialog Callbacks in Clipboard | Function with Constants'.

Control Definition:

 

<dlg-variable>nn =`x, y, width, height, type, control-name`

 

For Example:

MyDialog003=`000,000,000,000,MENUBAR,"Dialog_Bar"`

 

Attribute

Value

Meaning

dlg-variable

MyDialog

The name of the dialog box.

nn 

003

The ordinal position of the control in the dialog box (starting with 1).

x

000

Not applicable to this control.

y

000

Not applicable to this control.

width

000

Not applicable to this control.

height

000

Not applicable to this control.

type 

MENUBAR

The type of control.

control-name

"Dialog_Bar"

The name used to identify the control in a user defined callback procedure. The name cannot be more than 30 characters in length and MUST be unique. ( This attribute can only be used with 6.2 or later dialog formats. )

Event Options

Use the DialogProcOptions function to control when your User-Defined-Callback procedure is called by its associated dialog. You can also use it to control your dialog's behavior, while your procedure is executing. You usually establish callback events during the first call to the procedure i.e., event 0, but this can be done during any call.

Event-Option-Code Values

Meaning

 

Not applicable to this control. The User-defined callback is not called in response to the selection of menu items via mouse or access key when the menu item has an associated dropdown or submenu.  The associated dropdown or submenu is displayed instead.

See MENUITEM.

 

 

 

 

Dialog Callback Procedure Function Options

DialogControlGet function returns text and state information associated with a control.

Request

Meaning

@dcMenuNames (18)

Tab delimited list of menu item names associated with the control, menu item or menu bar.

 

 

 

DialogControlSet function changes the text or appearance of a control.

Request

Meaning

 

Not applicable to this control.

 

 

 

DialogControlState function changes a control’s style or gives control input focus.

Style

Meaning

 

Not applicable to this control.

 

 

 

 

 

 

 

§         Dialog

§         Dialog Overview

§         Defining the Dialog

§         Defining the Dialog Controls

§         Dialog Control Types

§         Dynamic Dialogs

§         InternetExplorer Controls

§         Dialog Units

§         Dialog Fonts

 

Control Types

§         Calendar

§         Checkbox

§         ComControl

§         DropListbox

§         Editbox

§         FileListbox

§         Groupbox

§         Itembox

§         MenuBar

§         MenuItem

§         MultiLinebox

§         Picture

§         PictureButton

§         PushButton

§         RadioButton

§         ReportView

§         Spinner

§         StaticText

§         VaryText