C++ Builder
| Главная | Уроки | Статьи | FAQ | Форум | Downloads | Литература | Ссылки | RXLib | Диски |

 
ComboBox и DropDownList
Black707
Отправлено: 17.09.2005, 18:00


Ученик-кочегар

Группа: Участник
Сообщений: 8



Как можно программно выставить значение ComboBox при Style=DropDownList, на свойство Text при этом перестает регировать...
BreakPointMAN
Отправлено: 17.09.2005, 18:41


Станционный диспетчер

Группа: Участник
Сообщений: 86



Воспользуйся свойством ItemIndex твоего ComboBox'а...
QUOTE

TCustomCombo::ItemIndex
Indicates which item in the drop-down list is selected.

__property int ItemIndex = {read=GetItemIndex, write=SetItemIndex, nodefault};

Description

Read ItemIndex to determine which item in the list is the selected value in the combo box. This value appears in the edit box portion of the combo box. The first item in the list has index 0, the second item has index 1, and so on. If no item is selected, the value of ItemIndex is -1.

Write to ItemIndex to programmatically select an item from the list by passing in the index value.


Отредактировано BreakPointMAN — 17/09/2005, 18:42

Вернуться в Вопросы программирования в C++Builder