* Set item checked state by name * 通过名称设置菜单项选中状态
(name: string, bChecked: boolean)
| 200 | * 通过名称设置菜单项选中状态 |
| 201 | */ |
| 202 | public setItemChecked(name: string, bChecked: boolean): void { |
| 203 | const item = this._list.getChild(name); |
| 204 | if (item && item instanceof GButton) { |
| 205 | const c = item.getController('checked'); |
| 206 | if (c) { |
| 207 | c.selectedIndex = bChecked ? 2 : 1; |
| 208 | } |
| 209 | } |
| 210 | } |
| 211 | |
| 212 | /** |
| 213 | * Check if item is checked by name |
nothing calls this directly
no test coverage detected