//**************************************************************************** // $Module type: Class // $Module name: cRDCReadOnlyForm // $Author : Nils G. Svedmyr, RDC Tools International // Created : 2014-03-17 @ 12:32 // // Description : // // $Rev History: // 2014-03-17 Module header created //**************************************************************************** Use Windows.pkg // Behaves like an ordinary Form where the field has been set to "No Enter" in the DD class. // However, this has the benefit that the tooltip still works! // Note: You need to change the field in the DD-class to _not_ be "No Enter". Class cRDCReadOnlyForm is a Form Procedure Construct_Object Forward Send Construct_Object Set Label_Justification_mode to JMode_Right Set Label_Col_Offset to 2 Set Label_Row_Offset to 0 Set Color to clBtnFace Set Focus_Mode to NonFocusable End_Procedure Procedure Set Status_Help String sText Forward Set Status_Help to (sText * "(Read-Only)") End_Procedure Procedure End_Construct_Object String sTooltip sStatus_Help Forward Send End_Construct_Object #IF (Required_FMAC_Version > 15) Get psToolTip to sTooltip Get Status_Help to sStatus_Help If (sTooltip = "" and sStatus_Help <> "") Begin Set psToolTip to sStatus_Help End #ENDIF End_Procedure Procedure Page_Object Integer iState Forward Send Page_Object iState // If enabled state was accidently set to false in the // object, turn it back on. Else the tooltip won't show. Set Enabled_State to True End_Procedure End_Class