Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Forcing behavior in the Class/Form Designer
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00611103
Message ID:
00611214
Views:
22
This message has been marked as the solution to the initial question of the thread.

...
What I am saying is that I have a control 'myControl' (e.g. an object subclassed from CONTROL) which can contain multiple other controls which correspond to variables I am adding to the top-level class. The properties and methods of the lower-level controls are not accesible (they're PRIVATE) which is how I want it.

I know that one can update these values to the inner-controls at runtime (by using Refresh(), etc...) However, I would like to update the inner controls during design time. So I can see how changes in things like color, width, etc... affect the layout of the control on the form without having to run the form all the time.

Basically, I want some way to tell the form designer that this custom property here 'myControl.cValue' is linked to this label (or textfield or button or whatever) here 'myControl.lblPrompt.Caption'.
...



Well first of all I should tell you that this that you want is already done in VB 6.0, but is not implemented yet in VFP7.

What I mean is that you do not have something like _ASSIGN method that works in Design time.

What you can do is to set your properties of the controls in the CONTROL class to expression like the following:
=This.Parent.Caption
But, this will NOT refresh the controls in design time either :(

Another option is to create an VB ActiveX that will do the job. - This is what our team will do in this case.

More info:
From VFP help
Access and Assign Methods
...
Access and Assign methods are executed when property values are queried or
changed at run time only. Querying or changing property values at design time
doesn't execute Access and Assign methods.
...
You can see also the following topic
Running the Project Manager Hooks Sample

But it is not for Form Designer, but for project changes.
Zlatin Zlatev,
MCSD (VS6)

Make solutions, not programs!

Previous
Next
Reply
Map
View

Click here to load this message in the networking platform