| 304 | } |
| 305 | |
| 306 | void ComboBox::setIndexSelected(size_t _index) |
| 307 | { |
| 308 | MYGUI_ASSERT_RANGE_AND_NONE(_index, mList->getItemCount(), "ComboBox::setIndexSelected"); |
| 309 | mItemIndex = _index; |
| 310 | mList->setIndexSelected(_index); |
| 311 | if (_index == ITEM_NONE) |
| 312 | { |
| 313 | Base::setCaption(UString()); |
| 314 | return; |
| 315 | } |
| 316 | Base::setCaption(mList->getItemNameAt(_index)); |
| 317 | Base::updateView(); // hook for update |
| 318 | } |
| 319 | |
| 320 | void ComboBox::setItemNameAt(size_t _index, const UString& _name) |
| 321 | { |
no test coverage detected