[Lazarus] Another newbie question

Bill de Carle ve2iq at magma.ca
Thu May 15 22:20:59 CEST 2008


Thanks Hector, Cyberpython for the help.
I had already managed to get it working using a listbox occupying an 
entire form2 but my code was pretty ugly and I'm not happy with 
it.  For one thing I put the "uses unit2" in the interface section of 
unit1.pas, not in the implementation section as per your 
example.  For some reason it worked ok for me but I wondered how one 
could be sure that unit2 would be compiled first so that it would be 
available for use by unit1.  I still don't understand how I am able 
to add lines to the list without having to worry about increasing the 
memory allocation and/or freeing it when form2 gets closed.  I'm 
using: form2.listbox1.items.add(string).  Also I found when I passed 
a string containing tabs to the listbox the tabs weren't expanded, 
just shown as a vertical bar graphic so I had to pre-format the 
string before passing it to the listbox so the columns will line up 
nicely.  I will look closely at your example, cyberpython, to see if 
there is anything I can do in a more straightforward way.
Thanks again,
Bill




More information about the Lazarus mailing list