Get selected value of TCombobox in Delphi RAD Studio 10

718 views Asked by At

How to get the selected value from a TComboBox?

The TCombobox name is comboTest

vaue_is := comboTest ???
1

There are 1 answers

12
Rudy Velthuis On BEST ANSWER

You can use ItemIndex:

if comboTest.ItemIndex >= 0 then
  vaue_is := comboTest.Items[comboTest.ItemIndex];

This should work equally well for VCL and FireMonkey (FMX).