At 12:18 PM 2/28/2014, Matthew Brock wrote:

I am converting an older version of Rbase to 9.5.
In the old version of a form, you had a way of making a field
only be able to be changed if in enter mode and when in edit
mode the value could not be changed. Is there a simple way to
do this in 9.5 or do you have to read the form property type
ie(edit/enter/browse) and then set the property for the control
to be readonly or not?

Matthew,

First, welcome to R:World!

Yes, there are several ways to accomplish the task of making
any DB or Variable Control(s) as READ-ONLY or not.

R:BASE eXtreme 9.5 (32/64) enables you to take advantage of
RBTI System Variables that are dynamically defined when the
the form is run as ENTER, EDIT, or BROWSE mode.

To accomplish the task, first you will have to assign the
Component IDs to all DB/Variable controls. Then, use the
following PROPERTY command as "On After Start" EEP.

-- Example
-- On After Start EEP
SWITCH (.RBTI_FORM_MODE)
   CASE 'ENTER'
      PROPERTY DBControlCompID READONLY 'FALSE'
      BREAK
   CASE 'EDIT'
      PROPERTY DBControlCompID READONLY 'TRUE'
      BREAK
ENDSW
RETURN

In the example above, DBControlCompID is the actual Component
ID assigned to a given DB Control.

For more details and examples, refer to R:Docs 9.5.

Hope that helps!

Please feel free to reach out to me with any questions.

Very Best R:egards,

Razzak

www.rbase.com
www.facebook.com/rbase
--
31 years of continuous innovation!
16 Years of R:BASE Technologies, Inc. making R:BASE what it is today!
--


Reply via email to