Walter Meester
HoogkarspelNetherlands
>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only