次の方法で共有


POPUP Resource (Compact 2013)

3/28/2014

This resource-definition statement creates a menu item that can contain menu items and submenus.

POPUP text, [[optionlist]]  {  item-definitions . . . } 

Parameters

  • text
    String that contains the name of the menu. This string must be enclosed in double quotation marks (").
  • optionlist
    Specifies the appearance of the menu item. This optional parameter can be one or more of the following redefined menu options, separated by commas or spaces.

    Value

    Description

    CHECKED

    Menu item has a check mark next to it. This option is not valid for a top-level menu.

    GRAYED

    Menu item is initially inactive and appears on the menu in gray or a lightened shade of the menu text color. This option cannot be used with the INACTIVE option.

    HELP

    Identifies a Help item.

    INACTIVE

    Menu item is displayed but it cannot be selected. This option cannot be used with the GRAYED option.

    MENUBARBREAK

    This option is the same as MENUBREAK except that for pop-up menus, MENUBARBREAK separates the new column from the old column with a vertical line.

    MENUBREAK

    For static menu bar items, MENUBREAK places the menu item on a new line. For menus, MENUBREAK places the menu item in a new column with no dividing line between the columns.

Example

The following code example shows how to use the POPUP statement.

chem MENU
{
  POPUP "&Elements"
  {
    MENUITEM "&Oxygen", 200
    MENUITEM "&Carbon", 201, CHECKED
    MENUITEM "&Hydrogen", 202
    MENUITEM SEPARATOR
    MENUITEM "&Sulfur", 203
    MENUITEM "Ch&lorine", 204
  } 
  POPUP "&Compounds"
  {
    POPUP "&Sugars"
    {
      MENUITEM "&Glucose", 301
      MENUITEM "&Sucrose", 302, CHECKED
      MENUITEM "&Lactose", 303, MENUBREAK
      MENUITEM "&Fructose", 304
    }
    POPUP "&Acids"
    {
      "&Hydrochloric", 401
      "&Sulfuric", 402
    }
  }
}

See Also

Reference

Resource-Definition Statements
MENU Statement
MENUITEM Statement