TiModeComboBox.SetValueNoEvent

TiModeComboBox

Used to set change the Value property without firing the OnChange event.

procedure SetValueNoEvent (Value : Integer);

Description

Call SetValueNoEvent to set the current Combo Box item value. Setting the value will set the item associated with the specified value without firing the OnChange event.

For example, if you have specified an item with text "Sample Item" and have associated a value of "100" to that item, the Value property will be 100 if the "Sample Item" is selected in the Mode Combo Box. If you call SetValueNoEvent with a value of 100, then the selected item in the combo box will change to "Sample Item".

The control will accept duplicate values for items in the list, however this is discouraged unless you need to do this. If duplicate values are found in the list while setting the Value property, the first item found with the matching value will be selected.

For most uses, simply use the default values for each item, incrementing by one with the first item starting at 0.

Note: the index value is the index of the item and not it's associated value property. When items are added to the Mode Combo Box control by using the AddItem procedure, the index of the item is 1 less than the ItemCount property.

Example

Delphi

iComponent.SetValueNoEvent(100);

C++ Builder

iComponent->SetValueNoEvent(100);

Contents | Index | Previous | Next