Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Have many buttons, want to save properties
Message
From
18/01/2008 08:59:39
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
 
 
To
18/01/2008 08:49:29
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01282903
Message ID:
01282911
Views:
8
>>I have a container class that has a row of command buttons. I have a need to save some of the properties of each button on intialization of the class. Doing one button was simple; just create the properties on the container. Now I need to do it for 10 buttons and I want to do it with the right approach. Creating button-specific properties on the container for 10 buttons doesn't seem like a good idea. Any ideas? Thanks!
>
>In the init of each button: This.addproperty('yourvar',yourvalue). The best is to create a common subclass for these buttons.

Ok, I rarely use the AddProperty in visual classes, but it makes sense. Thanks!

For extra credit: How can I change the baseclass of my buttons to reference a new baseclass button I create? Right now they are using the default Foxpro command button.

UPDATE: By the way, that worked like a charm! Thanks again!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform