Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DON'T LET THE USERS PAY
Message
From
01/10/1998 01:12:30
Bruce Gilmour
Cal-Mour Consultants
Calgary, Alberta, Canada
 
 
To
30/09/1998 12:24:00
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00142038
Message ID:
00142686
Views:
26
Thanks - it is in my good tricks file!

>>>I tend not to use explicit Edit mode. If a user want to edit some data he (or she) clicks (or tabs right to it) the data and changes it. All the changed data is coloring red just to let user see wich data has been changed. If the user want to undo the data, just click the undo button and the data is coloring blue again.(In my program editable data is colored blue, changed data is colored red, non-editable data is colored black)
>>
>>Now that's a neat idea. How, may I ask do you colour the changed data? Also, how do your users save the data? Is it done with a buttton or in the valid of each object?
>
>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
>
>in the lostfocus of the object:
>THISFORM.Refresh
>
>Remark: you have to use buffering to have this to work.
>I've put these code into my subclassed textboxes, comboboxes and editboxes
***************************
Bruce Gilmour

"Two things are infinite, the Universe and human stupidity. And I am not sure about the Universe."
- Albert Einstein
Previous
Reply
Map
View

Click here to load this message in the networking platform