MenuTitle()

Syntax

MenuTitle(Title$)
Description
Creates a new title item on the menu.

Parameters

Title$ The text to display in the title item. On Windows you can use the special '&' character to underline a specific letter, if the graphic theme allows it:

"&File" will actually display: File

Return value

None.

Remarks

MenuTitle() can't be used in popup menus, as there are no menu titles.

Example

  If OpenWindow(0, 200, 200, 200, 100, "MenuTitle Example")
    If CreateMenu(0, WindowID(0))
      MenuTitle("Project")      ; normal menu title with following item
        MenuItem(1, "Open")
        MenuItem(2, "Close")
      MenuTitle("&Edit")        ; menu title with underlined character, the underline
                                ; will only be displayed, when called with F10 key
        MenuItem(3, "Undo")
        MenuItem(4, "Redo")
      MenuTitle("About")        ; only menu title
    EndIf
    Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
  EndIf

See Also

MenuItem(), MenuBar(), OpenSubMenu()

Supported OS

All

<- MenuItem() - Menu Index - OpenSubMenu() ->