ReadOnly controls whether a component can be used for input |
Member of Date time field (PRIM_MD.DateTime)
Data Type - Boolean
The ReadOnly property determines whether a control can be used for input.
ReadOnly differs from the Enabled property in that the control can still respond to user actions.
Readonly modifies the behavior of the visual control. It does not affect any associated data variable.
This example shows the difference between fields that are enabled, disabled and readonly.
Begin_Com Role(*EXTENDS #PRIM_WEB) Height(440) Width(688)
Define_Com Class(#xDemoUnicode128.Visual) Name(#Readonly) Displayposition(3) Left(80) Parent(#COM_OWNER) Tabposition(3) Top(120) Width(521) Height(25) Caption('Readonly(True)') Labeltype(Caption) Readonly(True)
Define_Com Class(#xDemoUnicode128.Visual) Name(#Disabled) Displayposition(2) Left(80) Parent(#COM_OWNER) Tabposition(2) Top(152) Width(521) Height(25) Caption('Enabled(False)') Labeltype(Caption) Enabled(False)
Define_Com Class(#xDemoUnicode128.Visual) Name(#Normal) Displayposition(1) Left(80) Parent(#COM_OWNER) Tabposition(1) Top(88) Width(521) Height(25) Caption('Normal') Labeltype(Caption)
Evtroutine Handling(#COM_OWNER.CreateInstance)
#Normal := "Normal field"
#Readonly := "Readonly - Value cannot be changed"
#Disabled := "Disabled - Control cannot be accessed"
Endroutine
End_Com