Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
Find object in pageframe
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement