Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Object Pointers
Message
From
22/02/2001 21:40:19
Bryan Palmer
Ramtech Building Systems, Inc.
Texas, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Object Pointers
Miscellaneous
Thread ID:
00478679
Message ID:
00478679
Views:
57
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
Next
Reply
Map
View

Click here to load this message in the networking platform