Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Find object in pageframe
Message
From
21/10/2003 10:49:14
Victor Verheij
International Film Festival Rotterdam
Rotterdam, Netherlands
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Find object in pageframe
Miscellaneous
Thread ID:
00840669
Message ID:
00840669
Views:
57
Hello.

Can anyone help me with this.

I've created a listbox class (lstSpecial) with a doThing() method.
On the init event of the form containing this listbox i want to call the listbox's doThing() method.

Because i want to make things as generic as i'm able to, I can't be sure where the listbox is going to be put on the form and how things are named on the form. In most cases it will be on a page in a pageframe.

How can i invoke the dothing() method and check for the existence off the lstSpecial listbox class?

thnx. Victor

p.s. below is the code i've come up with so far wich results in an error "controls is not an object"

nControlsOnFrm = thisform.controlcount
for nFrmCounter = 1 to nControlsOnFrm
if thisform.controls(nFrmCounter).class = 'Iffpageframe'
nControlsOnPgf = thisform.controls(nFrmCounter).pagecount
for nPgfCounter = 1 to nControlsOnPgf
nControlsOnPag = thisform.controls(nFrmCounter).pages ;
(nPgfCounter).controls
for nPagCounter = 1 to nControlsOnPag
if thisform.controls(nPagCounter).class = 'lstNAWGegevens'
thisform.controls(nPagCounter).doThing(nValue)
endif
exit
endfor
endfor
endif
endfor
Next
Reply
Map
View

Click here to load this message in the networking platform