Hi Jim,
<i><font color="#663300">Just trying out codebook and I'm wondering if anyone has ever implemented an explicit edit mode. By that I mean that all controls remain locked until a user presses an edit button at which point all controls unlock, the navigation functions disappear, and the user is presented with "save" and "cancel" options.</i></font>
There is nothing built into Codebook to do this, but it is easy enough to add this functionality. I would recommend doing in the i-layer classes. One simple method for implementing this is to add a custom property to you form, say "cEditMode"
In the Refresh() method of your data input controls check the form's property and set themselves accordingly. Something like:
<pre>ASSERT PEMSTATUS("Thisform.cEditMode", 5) DO CASE CASE Thisform.cEditMode = "ReadOnly" This.Enabled = .F. CASE Thisform.cEditMode = "Edit" This.Enabled = .T. ENDCASE</pre>
Pamela pamela /at/ eagle-crest D.O.T com ©2002 Pamela Thalacker |