Jump to content

When will uniComboBox support 'value'?


mhmda

Recommended Posts

Hi,

 

it is very important that ComboBox and ListBox support 'value' so that we could get the 'text' and 'value' of the 'itemindex'

 

we don't want to create a custom component we would like to see it internally in unigui.

 

Farshad??

  • Like 2
  • Upvote 6
Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...

+1

I use for that a trick :

Fill two unicomboBox,

with the same order

one for the text, UnicomboBox1

other for the ID (no visible) UniComboBox2

 

As the itemIndex for the two uniComboBoxs is the same, you can get the value from

UniComBobox1.OnCloseUp :

Begin

Value = UniComboBox2.items[ UniComboBox1.itemindex];

end;

  • Like 1
  • Upvote 2
Link to comment
Share on other sites

  • 1 year later...
  • 1 year later...

Hello,

I need this feature too. This would simplify things greatly. Many people would benefit from this feature.

We need a property, say, UniComboBox1.ShowNamesOnly to make the combobox display only the name part of the name=value pairs in its Items property.

Link to comment
Share on other sites

for this scenario I use a dblockupcombobox
linked to a query that simulates the combo items

I create a query with the content
select 1 id, 'item 1' description
union
select 2 id, 'item 2'description
union
select 3 id,'item 3'description


it's not the most elegant but it works, and I don't need to create a physical table for this data.

  • Like 1
Link to comment
Share on other sites

10 hours ago, wilton_rad said:

for this scenario I use a dblockupcombobox
linked to a query that simulates the combo items

I create a query with the content
select 1 id, 'item 1' description
union
select 2 id, 'item 2'description
union
select 3 id,'item 3'description


it's not the most elegant but it works, and I don't need to create a physical table for this data.

Thank you for the workaround. You have a clever idea, by using a query component without the need to create physical table.

For UniComboBox, my workaround is "traditional". I use UniComboBox.Items to store the name part, and use separate StringList to store the value part.

Nevertheless, we need the combobox & listbox to support this feature, so we can use it naturally without workarounds.

  • Upvote 1
Link to comment
Share on other sites

  • 2 years later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...