//*************************************************************************** //* //* Class: cRDSDbRadioGroup //* Package Name: cRDSDbRadioGroup.pkg //* //*************************************************************************** Use DFAllEnt.pkg Use cRDSWinToolTip.pkg Register_Object oToolbar Register_Procedure Set phoCopy Handle ho Register_Procedure Set phoPaste Handle ho Register_Procedure Set phoCut Handle ho Class cRDSDbRadioGroup is a dbRadioGroup Import_Class_Protocol cRDSWinToolTip Procedure Construct_Object Forward Send Construct_Object Send Define_cRDSWinToolTip Set pbClassEnabledHandleType To False // True=Default Set pbClassDisabledHandleType To True // True=Default Set pbClassEntryStateHandleType To True // True=Default On_Key kFind Send msg_None On_Key kFind_Next Send msg_None On_Key kFind_Previous Send msg_None On_Key kSuper_Find Send msg_None On_Key kSuper_Find_Next Send msg_None On_Key kSuper_Find_Previous Send msg_None Set Entry_msg To DoDisableToolbarButtons Set Exit_msg To DoEnableToolbarButtons End_Procedure // Augment to display ToolTips for child objects if // this object sets the shadow_state for those child objects. Procedure Set Enabled_State Integer iState // The Group, RadioGroup, dbGroup and dbRadioGroup classes // works a bit differently then other classes; read not consistantly. // We cannot Forward_Send in this class, because then // ToolTips won't work for this or any child objects. // This has the disadvantage that the Group label and child // object labels, will _not_ be shadowed. // If you don't like this you cannnot have ToolTips for disbled // Groups or there child objects. If you choose _not_ to have ToolTips // for disbled objects comment out this whole procedure. //Forward Set Enabled_State To iState Broadcast Recursive Set Enabled_State To iState End_Procedure // Procedure Set Enabled_State 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 Procedure Set pbHidden Boolean bMode Set Visible_State To (Not(bMode)) Set Enabled_State To (Not(bMode)) Set Focus_Mode To (If(bMode = False, NonFocusable, Focusable)) End_Procedure // Set pbHidden Function pbHidden Returns Boolean Function_Return (Visible_State(Self)) End_Function // pbHidden End_Class // cRDSDbRadioGroup