EGL consoleUI 中的 MenuItem 字段

以下列表定义类型为 MenuItem 的变量中的各个 consoleField。所有 consoleField 都不是必需的;可通过设置下列三个字段中的任何一个来确定用户的选择:acceleratorslabelTextlabelKey
accelerators
指示相当于用户选择的 menuItem 的击键。每个击键都会执行对应于 menuItem 选择的 openUI 语句的 OnEvent 子句。
  • 类型String[]
  • 示例accelerators = ["F1", "ALT_F1"]
  • 缺省值none
  • 在运行时是否可更新?
comment
指定注释,这是选择 menuItem 时在特定于 menuItem 的注释行中显示的文本。
  • 类型String
  • 示例"Delete the record"
  • 缺省值Empty string
  • 在运行时是否可更新?

注释行就是菜单行下面的一行。

commentKey
指定用于搜索包括注释的资源束的键,注释 是选择 menuItem 时在特定于 menuItem 的注释行(如果有的话)中显示的文本。如果同时指定 commentcommentKey,则使用 comment
  • 类型String
  • 示例commentKey = "myKey"
  • 缺省值Empty string
  • 在运行时是否可更新?

资源束是由系统变量 ConsoleLib.messageResource 标识的,如 messageResource 中所述。

help
指定出现以下情况时要显示的文本:
  • 选择了该 menuItem;并且
  • 用户按了 ConsoleLib.key_help 中标识的键。
  • 类型String
  • 示例:help = "Deletion is permanent"
  • 缺省值Empty string
  • 在运行时是否可更新?
helpKey
指定用于搜索资源束的访问键,该资源束包含在出现以下情况时将显示的文本:
  • 选择了该 menuItem;并且
  • 用户按了 ConsoleLib.key_help 中标识的键。
如果同时指定 helphelpKey,则使用 help
  • 类型String
  • 示例helpKey = "myKey"
  • 缺省值Empty string
  • 在运行时是否可更新?

资源束是由系统变量 ConsoleLib.messageResource 标识的,如 messageResource 中所述。

labelText
表示 menuItem 的标签。
  • 类型String literal
  • 示例labelText = "Delete".
  • 缺省值none
  • 在运行时是否可更新?
labelKey
指定用于搜索资源束的键,该资源束包含 menuItem 标签。如果同时指定 labelTextlabelKey,则使用 labelText
  • 类型String
  • 示例labelKey = "myKey"
  • 缺省值Empty string
  • 在运行时是否可更新?

资源束是由系统变量 ConsoleLib.messageResource 标识的,如 messageResource 中所述。

name
MenuItem 名称,在运行时解析名称的编程环境中使用。另外,该名称将在对应于 menuItem 选择的 openUI 语句中使用。

建议名称字段的值与变量名称相同。

  • 类型String
  • 示例name = "myItem"
  • 缺省值none
  • 在运行时是否可更新?
使用条款 | 反馈
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.