Jump to content

[SOLVED] ComboBox - Select Item


photo

Recommended Posts

Hello together,

 

I'm saving an XML-File with all set values, like :"antialiasing: 4x" and so on.

 

This "4x" in XML-File will be read out at application start, and should be set then to the combobox.

 

I tried to do "setCurrentItem("4x")" or "setData("4x") but the value in dropdown didn't change.

 

My workarround solution now is, to run through the combobox-items, check's the actual text on index X and compare this text with the saved XML-File Text, if they are equal, I got my index.

 

For 30 or more comboBox's, this is in my opinion not the fastes variant.

 

Best regards

Lars

Link to comment

Hello Lars, my friend. :D

 

You shouldn't save string values to your config file. Instead of that save combo box current item index. Thats all, problem solved, world saved. :)

Link to comment

Hello unclebob :D,

 

thanks for reply.

Yes, that would be an opportunity to.

I know this solution out of the .NET Framework with a DropDownList - that's why the question.

 

So "case" can be closed.

World was saved : - )

 

Greetings

Lars

Link to comment
×
×
  • Create New...