AdvDBLookupComboBox 1-displays lookup column fieldname when no active list source 2-won't drop down when programmatically cleared

There are some situations where a AdvDBLookupComboBox is visible, but it's list source is not already active.

In these cases, it's showing the lookup column field name.
What's the right way to make it appear blank?
Because the are also situations when you want to programmatically clear it's content.

if I use .Clear, or .Text := '' , then when the list source is active, it won't drop down unless you type something in the edit box.

The only way I found to make it look like empty was .Text := ' ' (space), so then it'll drop down with no need for typing anything.

How to reproduce this:

Open the demo project: AdvDBLookupComboBoxNoDataSourceDemo

In Form1, add a tbutton, and move adoquery1.Active := true; from FormCreate to Button1Click.
Run it, and it'll Show "CalcField".

Now, on FormCreate put: AdvDBLookupComboBox1.text := ''; or AdvDBLookupComboBox1.Clear;
Run it, the control will be blank, now press Button1 to open the DataSet, and you won't be able to make it drop down unless you type something.

I think it should never show the fieldname to end user, and also that it should let you drop down the list even when Text property is cleared.

PS.: I also tried to clear it by doing ItemIndex := -1; , but when the list source is active, it shows the first item content.

Thanks for reporting.
We applied a fix that will be included in the next update.

1 Like

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.