TTMSFNCComboBox
The TTMSFNCComboBox is a component that works like a TComboBox from VCL, but it also supports HTML formatted texts. It uses TTMSFNCDefaultPicker and TTMSFNCTreeView under the hood.
By default the TTMSFNCComboBox.Style is set to csDropDown which makes it editable.
Items can be added at designtime via the Items property or programmatically:
procedure TForm3.Button1Click(Sender: TObject);
var
I: Integer;
begin
for I := 0 to 10 do
TMSFNCComboBox1.AddItem('Item ' + IntToStr(I));
end;
Properties
Property name | Description |
---|---|
AutoCloseUp | Property to automatically close the dropdown if the written text matches an item from the list. |
AutoComplete | Property to enable autocompletion. |
AutoCompleteDelay | Defines the delay between 2 keystrokes during autocompletion. Only applies if the Style is set to csDropDownList |
AutoCompleteNumChar | Defines the numer of characters that are necessary for autocompletion to trigger. Only applies if the Style is set to csDropDown. |
AutoDropDown | Property to automatically open the dropdown when typing. Relies on the |
AutoCompleteNumChar if the Style is set to csDropDown. | |
CaseSensitive | Enable or disable case sensitivity. |
DropDownCount | Maximum number of items to be shown in the dropdown. |
DropDownCount | Maximum number of items to be shown in the dropdown. |
Items | A string list of items. |
ItemIndex | Selected item index. |
Style | The 2 possible values are csDropDown and csDropDownList. It’s affecting the editability of the combobox. |
Text | Returns the text that is displayed in the combobox. |
Events
Event name | Description |
---|---|
OnItemSelected | Event called when an item is selected from the dropdown. |