Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DON'T LET THE USERS PAY
Message
From
30/09/1998 12:24:00
Walter Meester
HoogkarspelNetherlands
 
 
To
30/09/1998 11:27:21
Bruce Gilmour
Cal-Mour Consultants
Calgary, Alberta, Canada
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00142038
Message ID:
00142452
Views:
57
>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform