Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get value from ComboBox?

I have in MyForm a ComboBox (myComboBox ) with EnumType myEnumType .

In the modified method , I want to get the value.

I used the code looklike:

if (myComboBox.enumTypeValue() == myEnumType::Value1 )
{
//action
}

Or anothe way

if (myComboBox.enumType(myEnumType::Value1) )
{
//action
}

In both cases I can not take the value.

What is the way? Thanks, all!

Enjoy!

like image 701
ulisses Avatar asked Oct 27 '25 02:10

ulisses


1 Answers

To get the value of the ComboBox use the selection method,

if(myComboBox.selection() == myEnumType::Value1) {
   //action
}
like image 84
Brodie Avatar answered Oct 29 '25 07:10

Brodie