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

AVEVA™ InTouch HMI

wcGetItem() 函数

  • Last UpdatedJan 15, 2020
  • 1 minute read

返回一个字符串,包含与列表框或组合框中的 ItemIndex 所对应的项目的内容。

类别

Windows 控件

语法

[ErrorNumber=]wcGetItem("ControlName", ItemIndex, Tagname);

参数

ControlName

Windows 控件对象的名称。例如,ListBox_1。实际的字符串或消息标记名。

ItemIndex

与项目的位置对应的数字。任何数字或整型标记名。

Tagname

消息标记名。从函数返回时,wcGetItem 函数将该项目所对应的数据放入此标记名。

附注

如需已返回错误号的列表,请参阅理解 Windows 控件错误消息

适用范围

列表框与组合框。

示例

以下语句会在动作脚本运行时,将组合框中第十个项目的字符串值返回到 ListSelection 消息标记:

wcGetItem("Combobox_1", 10, ListSelection);

如果列表中的第十个项目是“Vanilla”,则 ListSelection 标记包含字符串“Vanilla”。

In This Topic