jmdoneva Posted September 30, 2016 Posted September 30, 2016 Can OwnerDraw be implemented for the TUniComboBox? Quote
Sherzod Posted September 30, 2016 Posted September 30, 2016 Hi, For what purpose you wanted to use it ? Best regards. Quote
jmdoneva Posted September 30, 2016 Author Posted September 30, 2016 when you use name/value pair in a string assigned to the combobox and want to hide the value and just show the name in the dropdown you have to do a owner draw something like this procedure comboboxDrawItem(Control: TwinControl; Index: Integer; Rect : TRect; State: TOwnerDrawState); begin combobox.Canvas.TextRect(Rect, Rect.Left, Rect.Top, combobox.Items.Names[index]); end; This will show just the name portion of the name/value pair in the dropdown. The value is still there but just is hidden. So I want to hide the values and only show the names. Quote
Administrators Farshad Mohajeri Posted September 30, 2016 Administrators Posted September 30, 2016 If you have a DB table with name value pair, you can use TUniDBLookupCombobox for same purpose. Please see UniComboBox DBLookupComboBox demo Quote
jmdoneva Posted September 30, 2016 Author Posted September 30, 2016 Thank you for your help. I will work on the dblookupcombo or do something different. Sent from my XT1635-01 using Tapatalk Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.