* Set item text by name * 通过名称设置菜单项文本
(name: string, caption: string)
| 146 | * 通过名称设置菜单项文本 |
| 147 | */ |
| 148 | public setItemText(name: string, caption: string): void { |
| 149 | const item = this._list.getChild(name); |
| 150 | if (item && item instanceof GButton) { |
| 151 | item.title = caption; |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | /** |
| 156 | * Set item visibility by name |