Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Access Method
Message
From
21/12/2019 10:57:57
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Miscellaneous
Thread ID:
01672305
Message ID:
01672377
Views:
62
>My textbox base class (in my application) has a property .BACK_COLOR_FOCUS (current has a value hard-coded). This property would have to be set to the value oApp.BACK_COLOR_FOCUS (Access method of the oApp class). But I cannot set it in the visual class. In a PRG class that would work.

Here, this works (all in command window; curform.prg is on the path):
create class testThomas as textbox of libs\ctls
ox=curform()
ox.AddProperty("backcolor_x","=goapp.bkcolor")   && next I saved the class and closed class editor
goapp=createobject("empty")
addproperty(goapp, "bkcolor", 32)
_screen.NewObject("oxx", "testthomas", "libs\ctls.vcx")
?_screen.oxx.backcolor_x
Here's curform.prg, which you can actually do in command window line by line:
ASELOBJ(aa,1)
RETURN aa[1]
It doesn't really matter that there's a goapp.bkcolor_access method or not - I suggested having that method just for debugging, to see how many times it fires. The .bkcolor property (and other of your color properties) may as well be set in goApp.ReadConfig() method, or even hardcoded.

back to same old

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

Click here to load this message in the networking platform