Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Textbox Dilemma
Message
 
To
04/09/1998 10:40:46
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00133285
Message ID:
00133306
Views:
9
>I plan on having a button for the user to append the records. But when there not appending, I just want the user to view the data in the textboxes and not alter it.

John,

Give your form a new property named Editing and set it to .F. in teh property sheet. Then in your edit button put;

THISFORM.Editing = .T.
THISFORM.Refresh()

In the form's refresh you can set the enabled property to be the same as the editing property;
FOR EACH oCont IN THISFORM.Controls
  IF PEMSTATUS(oCont,"Enabled",5)
     oCont.Enabled = THISFORM.Editing
  ENDIF
ENDFOR
Then in your save and cancel buttons put;

THISFORM.Editing = .F.
THISFORM.Refresh()

Beside the code to same or revert the user's work.

You can affect the visual display by using the DisabledForeColor and DisabledBackColor properties of each control. Make them so the colors are different than the enabled colors, because it is always a good idea to give the user visual clues to what they can and cannot do.
Previous
Reply
Map
View

Click here to load this message in the networking platform