//**************************************************************************** // $Module type: Class package // $Module name: RdsButton.pkg // $Author : Nils G. Svedmyr // Created : 2002-02-14 @ 13:25 // // Description : Button class for RDS - Robin's Data Synch tool. // Auto enable/disable Toolbar's Cut, Copy and Paste buttons // // $Rev History // 2002-02-14 Module header created //**************************************************************************** Register_Object oToolbar Register_Procedure Set phoCopy Handle ho Register_Procedure Set phoPaste Handle ho Register_Procedure Set phoCut Handle ho Class RdsButton is a Button Procedure Construct_Object Forward Send Construct_Object Set Entry_msg to DoDisableToolbarButtons Set Exit_msg to DoEnableToolbarButtons End_Procedure // Construct_Object Procedure End_Construct_Object Forward Send End_Construct_Object End_Procedure // End_Construct_Object Procedure DoEnableToolbarButtons Handle ho Move (oToolBar(Self)) to ho If ho Begin Get phoCut To ho If ho Set pbEnabled Of ho To True Get phoCopy To ho If ho Set pbEnabled Of ho To True Get phoPaste To ho If ho Set pbEnabled Of ho To True End // If ho Begin End_Procedure // DoEnableToolbarButtons Procedure DoDisableToolbarButtons Handle ho Move (oToolBar(Self)) to ho If ho Begin Get phoCut To ho If ho Set pbEnabled Of ho To False Get phoCopy To ho If ho Set pbEnabled Of ho To False Get phoPaste To ho If ho Set pbEnabled Of ho To False End // If ho Begin End_Procedure // DoDisableToolbarButtons End_Class // RdsButton