Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2013-06

TComboBox with AutoComplete property

5 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Johan Tu Toit

Good day,

I tried the above code on my onCreate procedure:

if Sender Is TComboBox then
     with Sender As TComboBox do begin
          AutoComplete:= True;
     end;

When I typed any letter on the TComboBox component, the AutoComplete property do not auto select any element on the list.

Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130614/b38c6c85/attachment.html>

Reply by email

William Oliveira Ferreira
to Johan Tu Toit

Normally we do that inside a tform.components loop

Sorry about english mistakes

_____
William de Oliveira Ferreira

"Johan Tu Toit" wrote 21 lines
Good day, I tried the above code on my onCreate procedure: if Sender Is TComboBox then with Sender As TComboBox do begin AutoComplete:= True; end; When I typed any letter on the TComboBox component, the AutoComplete property do not auto select any element on the list. Thanks in advance. -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130614/6fdc9cb5/attachment-0001.html>

Reply by email

leledumbo
to Johan Tu Toit: I tried the above code on my onCreate procedure: if Sender Is TComboBox then with Sender…

OnCreate of what? For TForm, the Sender parameter would be... the form itself. Why don't you directly set the property? i.e. ComboBox1.AutoComplete := true;

View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-TComboBox-with-AutoComplete-property-tp4031889p4031893.html Sent from the Free Pascal - Lazarus mailing list .

Reply by email

Johan Tu Toit
to leledumbo

I has many TComboBox components on the forms without the AutoComplete property set to True, so I was looking for the easy way to make it True during the run time.

leledumbo wrote 18 lines
OnCreate of what? For TForm, the Sender parameter would be... the form itself. Why don't you directly set the property? i.e. ComboBox1.AutoComplete := true; -- View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-TComboBox-with-AutoComplete-property-tp4031889p4031893.html Sent from the Free Pascal - Lazarus mailing list . -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130615/9d11ab5f/attachment.html>

Reply by email