Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DON'T LET THE USERS PAY
Message
De
01/10/1998 02:25:53
Walter Meester
HoogkarspelPays-Bas
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00142038
Message ID:
00142695
Vues:
31
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform