Topic: first impti field in combobox

hello
is there a possibility to elliminate the first empti field in the combobox when droped down
i want to use it as autocomplete. but without the impti first white field .
thank you .

Re: first impti field in combobox

Hello ichame

You can use those :

procedure Form1_OnShow (Sender: string; Action: string);
begin
Form1.ComboBox1.dbDeleteRecord (-1);
end;

or this way:

procedure Form1_OnShow (Sender: string; Action: string);
begin
Form1.ComboBox1.dbDeleteRecord (-1);                                                   // SIf needed to rid off first empty element
if Form1.ComboBox1.Items.Count>0 then Form1.ComboBox1.ItemIndex := 0;   // Select the fisrt entry in the combobox
end;

JB

Re: first impti field in combobox

hello jean

thank you for help
i will try them all.

Re: first impti field in combobox

Hello.


The ComboBox have a property Additional > FirstEmptyItem, set its value to False.

Dmitry.

Re: first impti field in combobox

Hello
Thank you very much Dmitry
for your quik reply
it s a great forum.

Re: first impti field in combobox

Hello

Well seen Dmitry !

I've forgotten this new property !

Getting old is a bad thing !

JB