* Set item grayed state by name * 通过名称设置菜单项灰色状态
(name: string, bGrayed: boolean)
| 169 | * 通过名称设置菜单项灰色状态 |
| 170 | */ |
| 171 | public setItemGrayed(name: string, bGrayed: boolean): void { |
| 172 | const item = this._list.getChild(name); |
| 173 | if (item && item instanceof GButton) { |
| 174 | item.grayed = bGrayed; |
| 175 | } |
| 176 | } |
| 177 | |
| 178 | /** |
| 179 | * Set item checkable state by name |