Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot change propertes of Parent class form object
Message
From
11/10/2000 18:28:11
 
 
To
11/10/2000 17:59:14
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00427815
Message ID:
00428202
Views:
16
>>>I have added an image to a form class.
>>>
>>>In instances of the form class I try to set the Visible property of the Image to .f. to prevent it from appearing on the form when it is not needed.
>>>
>>>It still appears. I tried setting the Left & Top properties to -1000. They stay where they are.
>>>
>>>In other words I cannot change the properties of an object of a parent form class.
>>>
>>>Am I missing somthing? Of course I can add an object when it is needed, however I would prefer to hide it when it is not since I can then locate it easily in the form designer in each instance of the form class.
>>>
>>>Thank you in advance.
>>
>>Sounds like there's something in the parent class that's forcing it to visible (either by Visible = .T. or Top and Left settings)
>>You could set it in the subclass form's Init() instead of at design time.
>
>I am linking forms together were it makes sense. I have mechanical equipment in one list. The motors are in another. If the equipment form is open and I open the motor form, the two are linked together. If I page thru the motors the equipment form pages to the different equipment records based on which motor is showing.
>
>The image I want to put up is a small locked or unlocked padlock. Clicking on the locked padlock removes the link between the two forms. Clicking on the unlocked restores the link.
>
>Most of the subclasses can link to others. However when there is only one form visible it makes no sense to show one of the padlocks. This can be accomplished in the Parent Class Init Method for all forms.
>
>I am AddObject'ing a shape of the same size as the image to cover it. However it seems stange that I cannot make a Parent object invisble or at least move it off of the form.
>
>Surely this is not as intended by Fox.

You'll really need to trace through your code and find out who's making it visible. We do just this in our code all the time and it does work just fine.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Reply
Map
View

Click here to load this message in the networking platform