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:
00611180
Views:
30
Tom,

I'm still confused but will offer something. . .

The controls that have VISIBLE things all work the way you seem to describe. That is, you can see the effect of a change done in the Property window as soon as it's entered there.

I take it that, for one reason or another, you want to have your own version of some/all of these standard properties and make them behave like the standard properties. I.e., you want your peoperty to visibly override the standard property.

*IF* that's what you want, it really does beg the question WHY???? I mean, those things are ALREADY there to operate the way they do TO SAVE YOU THE WORK. I suppose that VFP could have delivered, say, 3 basic controls and left us to our own devices otherwise.
If your reason for wanting to do so is, as might be inferred from the example you've given 3 or 4 times now, to program the properties with (a version of) Hungarian notation, then I suggest that you get over it, bite the bullet, and code THESE things without Hungarian notation.

Frankly it is to my great delight that VFP is not delivered with Hungarian being intrinsic.

Jim Nelson

>Nope, that's not what I'm after either. Thank you all for helping, though. I do appreciate it. I'm bad at explaining things like this.
>
>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'.
>
>Thanks, again
>
>Tom
>
>P.S. The knicks did win! Exciting game too! Perhaps I can start watching them again.
>
>>Tom:
>>
>>>myControl.myLabel.Caption=cCaption).
>>
>>A VFP control that is capable of displaying a caption has a "caption" property. If you take a VFP base class and subclass it, if it (the base class) has a caption property, you just set a value to it from the property sheet and it will be reflected in the control in the form editor. I'm not sure there is much more to it than this.
>>
>>If you want a programatic way of assigning a value to the caption property without setting it in the caption sheet (and not at runtime), take a look at the VFP function SYS(1270) in help. Basically, hover your mouse pointer over the control you are interested in. In the command window, do
>>
>>o = sys(1270)
>>
>>This will give you an object reference to the control in "o". Then, you can say something like.
>>
>>o.caption = 'MyCaption'
>>
>>Hope this helps.
>>
>>-Gary
Previous
Reply
Map
View

Click here to load this message in the networking platform