Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DON'T LET THE USERS PAY
Message
From
01/10/1998 02:25:53
Walter Meester
HoogkarspelNetherlands
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00142038
Message ID:
00142695
Views:
30
>In the refresh event of the object:
>
>LOCAL cAlias
>
>cAlias=IIF(!EMPTY(THIS.Controlsource) AND AT(".",THIS.Controlsource) > 2,;
> LEFT(THIS.Controlsource, AT(".",THIS.Controlsource)-1),"yy")
>
>DO CASE
> CASE THIS.SpecialEffect=0
> THIS.Forecolor=RGB(0,0,0)
> CASE This.controlsource="m."
> THIS.Forecolor=RGB(0,0,255)
> CASE THIS.ReadOnly
> THIS.Forecolor=RGB(64,64,64)
> CASE !EMPTY(THIS.Controlsource) AND OLDVAL(THIS.Controlsource, cAlias) # EVAL(THIS.Controlsource)
> THIS.Forecolor=RGB(255,0,0)
> OTHERWISE
> THIS.Forecolor=RGB(0,0,255)
>ENDCASE
>

>Walter,

>What happens if SpecialEffect is 0 AND ControlSource is "m." or ControlSource >is "m." AND ReadOnly is true?

Jim,

Well, my text-,edit- and comboboxes are normaly flat (specialeffect=1), but when they recieve the focus they become 3D (specialeffect=0, in the gotfocus event). I made the forecolor black when a control recieves the focus (just a matter of taste).

If the control does not have the focus, it should be looking if the control is readonly, (appearantly i've swapt the 2nd and 3rd case OOPS:) ).

Then it should determine if the controlsource is a memory variable (m.). These should alway be blue because generally the will not be stored in a database and there is no direct way to check if the value was changed.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform