Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Remove all objects from a container?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01192611
Message ID:
01193245
Views:
24
I'm affraid this code wouldn't work. It should be something like:
do while this.ControlCount#0
    this.RemoveObject(this.Controls[this.ControlCount].name)
enddo
And I would use .Objects & .Objects.Count instead of .Controls & .ControlCount

Regards,
Sergey

>>>Anyone got a code snippet to remove all objects from a container?
>>>
>>>Thanks!
>>
>>From the top of my head (not tested)
>>
>>for lnI = this.ControlCount to 1 step - 1
>>    this.RemoveObject(this.Controls[m.lnI].name)
>>next
>
>Perfect! I'd forgoten about the controlcount propery....
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform