[Lazarus] TListBox Find method?

payl payl at wp.pl
Tue Aug 26 17:50:41 CEST 2014


> Why not to implement a Find method for TListBox which allows partial  
> search? Delphi missed it, but why Lazarus does the same?

I'd say that you cannot find something in TListBox which is visual object.  
You can search something in items it has, therefore you use  
"Items.Indexof". Then you only need to take care of how TStringList works  
and TListBox is unimportant. So it will be easier to deal with than if we  
had custom implementations of containters for all types of visual  
interfaces like TEdit, TMemo etc... Moreover if we will implement  
DeleteMany for example, we will only have to update TStringList, not  
TEdit/TMemo/TListbox.
Only argument against such thing is case where you have to use many  
characters to represent same thing. So we have "with" construction...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20140826/3740f377/attachment-0003.html>


More information about the Lazarus mailing list