//**************************************************************************** // $Module type: CLASS // $Module name: cDbComboBoxFormat.pkg // $Author : Nils G. Svedmyr // Created : 2002-07-20 @ 09:02 // // Description : // // $Rev History // 2002-07-20 Module header created //**************************************************************************** Use cRdsDbComboform.pkg Register_Procedure CancelWizard // Visual DataFlex 12.0 Migration Utility, added March 28, 2007: 15:13:23 #IF (!@ >= 120) { OverrideProperty=Entry_State InitialValue=False } { OverrideProperty=Combo_Sort_State InitialValue=False } { OverrideProperty=Label_Row_Offset InitialValue=0 } { OverrideProperty=Label_Col_Offset InitialValue=2 } { OverrideProperty=Label_Justification_Mode InitialValue=jMode_Right } { OverrideProperty=Label_Justification_Mode EnumList="jMode_Right, jMode_Left, jMode_Center" } { OverrideProperty=Size InitialValue=13,150 } #ENDIF Class cDbComboformFormat Is A cRdsDbComboform Procedure Construct_Object Forward Send Construct_Object // Visual DataFlex 12.0 Migration Utility, added March 28, 2007: 15:13:24 #IF (!@ >= 120) { InitialValue=True } #ENDIF Property Boolean pbFrom True Property Handle phoDD (Main_DD(Self)) On_Key kCancel Send CancelWizard // Needed by the Connect Wizard. On_Key kClose_Panel Send CancelWizard End_Procedure // Construct_Object Procedure End_Construct_Object Forward Send End_Construct_Object End_Procedure // End_Construct_Object Procedure DoDelegateCancel Send CancelWizard End_Procedure // DoDelegateCancel Procedure DoCheckClear Broadcast Recursive Send DoEnableDisable Of (Parent(Self)) 0 End_Procedure // DoCheckClear // Send from DDO on New_Current_Record: Procedure DoFindData Handle hoDD Integer iFile iField iDbType // If (pbFrom(Self)) showln "DoFindData i cDbComboformFormat" Get phoDD To hoDD Get Data_File Item 0 To iFile Get Data_Field Item 0 To iField Get File_Field_Current_Value Of hoDD iFile iField To iDbType Broadcast Send DoEnableDisable Of (Parent(Self)) iDbType End_Procedure // DoFindData // We want to optimize when to send DoEnableDisable. // Only do it if the selection has changed. However, // the base class behaves a bit different if the enter key // is pressed or the mouse has been clicked. If enter is // pressed the iOldDbType and iDbType value will always be // the same. So if enter is pressed send DoEnableDisable // unconditionally. Procedure OnCloseUp Handle hoDD hoParent Integer iFile iField iDbType iOldDbType iRetval iVKey iItem String sValue sDriver Boolean bOpen Get AnsiKey To iVKey // Get the last virtual key Get phoDD To hoDD Get Data_File Item 0 To iFile Get Data_Field Item 0 To iField // 2003-05-27 ------------------------------------ Start Nils G. Svedmyr // Bug fix. // Get File_Field_Current_Value Of hoDD iFile iField To iOldDbType Forward Send OnCloseUp Get File_Field_Current_Value Of hoDD iFile iField To iDbType // If iFile Begin // Get_Attribute DF_FILE_OPENED Of iFile To bOpen // If Not bOpen Break // Get_Attribute DF_FILE_DRIVER Of iFile To sDriver // If (pbFrom(Self)) Set Field_Changed_Value Of (phoDD(Self)) Field SncTable.FromDriver To sDriver // Else Set Field_Changed_Value Of (phoDD(Self)) Field SncTable.ToDriver To sDriver // End // If iFile Begin // Showln iOldDBType " " iDbType " cDbComboformFormat" // If (iOldDbType <> iDbType Or iVKey = Vk_Return) Begin // 2003-05-27 ------------------------------------ Stop Nils G. Svedmyr Move (Parent(Self)) To hoParent Broadcast Send DoCheckClear Of hoParent Broadcast Send DoEnableDisable Of hoParent iDbType // End // If (iOldDbType <> iDbType Or iVKey = Vk_Return) Begin End_Procedure // OnCloseUp End_Class // cDbComboformFormat