Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Forcing behavior in the Class/Form Designer
Message
From
28/01/2002 14:27:36
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00611103
Message ID:
00611802
Views:
26
>Sorry, guess my example wasn't too hot.
>
>Here's what I am talking about
>
>
>You have a control 'myControl' or something which contains a label 'myLabel'. The control has a custom property named 'cCaption'. What I want is to change value of 'cCaption' and have it change the text displayed in the label (ala. myControl.myLabel.Caption=cCaption).
>
>The trick is I want this behavior in the Form Editor; I know how to do it while the form is running (Refresh() and Init() events). But the methods don't fire inside the Form Editor (thank god). But I want to make my own custom widgets and I want them to respond to property changes the way the VFP controls do.

You can only write a builder to do this with your control, just to save you some work - but that's nearly manual, because you have to choose to run the builder. The benefit of a builder is that it can bring up the few properties that you're interested in, and it can set the other properties that you want (i.e. you change the cCaption on MyControl using your builder, and the builder copies that value into mycontrol.mylabel.caption). Another benefit of the builder is that you have to write it only once :)

>P.S. Man if the knicks don't win this game... I don't know, I'm gonna lose it

I'll never understand this sort of passion, specially about a game which lasts n times 10 seconds, with long breaks between.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform