Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Combobox and Livebinding... (URGENT!)


This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 2 - Last Post: Apr 16, 2017 7:17 AM Last Post By: Thiago Silva
Thiago Silva


Posts: 37
Registered: 12/20/04
Combobox and Livebinding... (URGENT!)  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 10, 2017 4:40 PM
Hi everyone,

I am a simple issue here.

For example, I have a TComboBox with Items property filled manually with 3 options: Yellow, Blue and Red and linked in a table field char(01) to store only the first char. Here that´s okay but I need to show the entire word of the color when I select the register but it does not works.

How to solve it ? I need to get the first char and change the ItemIndex automatically or something like that?

Regards,

Thiago

Edited by: Thiago Silva on Apr 15, 2017 6:19 PM
Eli M

Posts: 1,346
Registered: 11/9/13
Re: Combobox and Livebinding... (URGENT!)  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 15, 2017 10:12 PM   in response to: Thiago Silva in response to: Thiago Silva
Use an invisible TEdit. Bind to the TEdit. Put translation code in the TEdit OnValidate to set the TComboBox ItemIndex. Put code in the OnChange of the TComboBox to set the TEdit with your single character and then call TLinkObservers.ControlChanged(MyEdit);.
Thiago Silva


Posts: 37
Registered: 12/20/04
Re: Combobox and Livebinding... (URGENT!)  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 16, 2017 7:17 AM   in response to: Eli M in response to: Eli M
Eli M wrote:
Use an invisible TEdit. Bind to the TEdit. Put translation code in the TEdit OnValidate to set the TComboBox ItemIndex. Put code in the OnChange of the TComboBox to set the TEdit with your single character and then call TLinkObservers.ControlChanged(MyEdit);.

Thank you for the tip!

Thiago
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02