SelectPos selects or unselects the item at the specified position
(pos int, state bool)
| 209 | |
| 210 | // SelectPos selects or unselects the item at the specified position |
| 211 | func (li *List) SelectPos(pos int, state bool) { |
| 212 | |
| 213 | if pos < 0 || pos >= len(li.items) { |
| 214 | return |
| 215 | } |
| 216 | litem := li.items[pos].(*ListItem) |
| 217 | if litem.selected == state { |
| 218 | return |
| 219 | } |
| 220 | litem.SetSelected(state) |
| 221 | li.update() |
| 222 | li.Dispatch(OnChange, nil) |
| 223 | } |
| 224 | |
| 225 | // SetItemPadLeftAt sets the additional left padding for this item |
| 226 | // It is used mainly by the tree control |
nothing calls this directly
no test coverage detected