| 54 | } |
| 55 | |
| 56 | void ListBox::selectChild(Widget* item) |
| 57 | { |
| 58 | for (auto child : children()) { |
| 59 | if (child->isSelected()) { |
| 60 | if (item && child == item) |
| 61 | return; |
| 62 | |
| 63 | child->setSelected(false); |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | if (item) { |
| 68 | item->setSelected(true); |
| 69 | makeChildVisible(item); |
| 70 | } |
| 71 | |
| 72 | onChange(); |
| 73 | } |
| 74 | |
| 75 | void ListBox::selectIndex(int index) |
| 76 | { |
no test coverage detected