I've got a form with a very large number of controls. I've got two custom button classes, and a custom label class. I'm trying to show up to 15 "trucks" per page, each truck has 2 areas it services and 14 timeslots. I've got in my load event the following code:
for lnTrkLoop = 1 to 15
lcID = padl( alltrim(str(lnTrkLoop,2,0)),2,"0")
this.newobject( "trk"+lcID,"xtruckbuttons","xcontrols")
this.aTrucks[lnTrkLoop]=this.trk&lcID.
next
I've removed the area labels and timeslot buttons for brevity here. When I create an instance of this form, it takes a while for it to load obviously. I'm trying to speed things up by manually placing all the controls on the form class and changing the load code to:
for lnTrkLoop = 1 to 15
lcID = padl( alltrim(str(lnTrkLoop,2,0)),2,"0")
this.aTrucks[lnTrkLoop]=this.trk&lcID.
next
I've got a display problem now though. When I used the newobject code above, I could change display properties simply by issuing a this.aTrucks[ lnLoop ].visible = .t. When I've placed the controls directly on the form and named them according to the trkNN format, the form does not update the visible or enabled properties. Actually, it does update the properties when viewed in the debugger, but the form does not make any changes to the control itself. Am I doing something wrong in my object pointer statements?
Thanks
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