Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot change the object.name property. /Re-wrote/
Message
From
20/02/1998 15:36:51
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00080192
Message ID:
00080199
Views:
22
>Hi,
>
>Let me describe my problem.
> At first I created class MyOptionGroup based on OptionGroup. The property MyOptionGroup.ButtonCount equals 2. Then I added an object, based on MyOptionGroup class, on a form. At last I wanted to change the Name property of an option (Thisform.Myoptiongroup1.option1.Name) from "option1" to something more informative like optName, yet I couldn't. The Name property of all options inside of the option group is now disabled (in gray color)!
>
>Thanks for you help.
>Igor Gelin

Hi Igor,

I think Edward has already answered your question. When you created the option button class with two buttons already instantiated in the object, you cannot change certain properties because you would be changing the parent class. I have done this also and found I had to create the class with buttoncount = 0 ( i.e. no buttons instantiated ) then you can instantiate buttons visually in the form designer or add them programatically ( buttoncount = MyButtonNumber, 1, 3, etc. ). BTW this is also true of the CommandButton class.

Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform