Forum > General

Probably a dumb question about procedures and objects on form - maybe??


I'm not even sure how to word this so I'll describe it.  :-[

I have a form, Form1, I'm using as a popup to set up default settings.  I can use the controls to get a selection in a list box, listbox1, but if I try to access the listbox in a procedure I want to create to do background stuff to the form I have to use Form1.listbo1.yadyada instead of just listbox1.yadayada.  This procedure is in the same file as Form1 is using and I was wondering why I'm having to do this??  Is it normal or did I mess something up or miss something when I declared the procedure that makes me have to use the whole thing instead of just for control name itself.  Not a huge deal but I just like to keep things as simple as possible and to me listbox1.yadayada is neater looking then Form1.listbox1.yadayada.


Make the procedure a method belonging to class TForm1 and then it can access all members of its class.


I knew it was something simple.   :-[



[0] Message Index

Go to full version