//AB/ Project Addressee types panel //AB/ Object prj is a Dialog_Project //AB/ Set ProjectName to "Addressee types panel" //AB/ Set ProjectFileName to "AddresseeType.DG" //AB/ Set GenerateFileName to "NONAME" // Project Object Structure // oAddresseeTypePanel is a ModalPanel // oTypesList is a List // oOkButton is a Button // oCancelButton is a Button // Register all objects Register_Object oAddresseeTypePanel Register_Object oCancelButton Register_Object oOkButton Register_Object oTypesList //AB-IgnoreStart Use DFAllEnt.pkg //AB-IgnoreEnd //AB-IgnoreEnd Object oAddresseeTypePanel is a ModalPanel //AB-StoreTopStart Set Extended_Window_Style To WS_EX_TOOLWINDOW False Set Extended_Window_Style To WS_EX_DLGMODALFRAME True Property Integer piChosenType Public 0 //AB-StoreTopEnd Set Label to "Types" Set Size to 84 83 Set Location to 26 79 //AB-DDOStart //AB-DDOEnd Object oTypesList is a List Set Size to 50 70 Set Location to 5 5 Set Border_Style to Border_Normal //AB-StoreStart Item_List On_Item "TO" Set Aux_Value Item 0 To MAPI_TO On_Item "CC" Set Aux_Value Item 1 To MAPI_CC On_Item "BCC" Set Aux_Value Item 2 To MAPI_BCC End_Item_List //AB-StoreEnd End_Object // oTypesList Object oOkButton is a Button Set Label to "&Ok" Set Default_State to TRUE Set Size to 14 35 Set Location to 52 5 //AB-StoreStart //**************************************************************************** // $Module type: PROCEDURE // $Module name: OnClick // $Author : Vincent Oorsprong // Created : 05/31/99 @ 8:45 // // Description // When the user clicks this button we need to select the messagetype and // exit the panel // // $Rev History // 05/31/99 VO Module header created //**************************************************************************** Procedure OnClick Send DoSelectAndExit End_Procedure // OnClick //AB-StoreEnd End_Object // oOkButton Object oCancelButton is a Button Set Label to "&Cancel" Set Size to 14 35 Set Location to 52 41 //AB-StoreStart //**************************************************************************** // $Module type: PROCEDURE // $Module name: OnClick // $Author : Vincent Oorsprong // Created : 05/31/99 @ 10:52 // // Description // When this method is fired - the button is clicked - we close the panel // // $Rev History // 05/31/99 VO Module header created //**************************************************************************** Procedure OnClick Send Close_Panel End_Procedure // OnClick //AB-StoreEnd End_Object // oCancelButton //AB-StoreStart Set Locate_Mode To Center_On_Parent //**************************************************************************** // $Module type: PROCEDURE // $Module name: DoSelectAndExit // $Author : Vincent Oorsprong // Created : 17/09/98 @ 17:01 // // Description // This method will log the choice and exits the dialog // // $Rev History // 17/09/98 VO Module header created //**************************************************************************** Procedure DoSelectAndExit Integer iCurrentItem iType hoTypesList Move oTypesList To hoTypesList Get Current_Item Of hoTypesList To iCurrentItem Get Aux_Value Of hoTypesList Item iCurrentItem To iType Set piChosenType To iType Send Close_Panel End_Procedure // DoSelectAndExit On_Key Key_Alt+Key_O Send KeyAction To oOkButton On_Key Key_Alt+Key_C Send KeyAction To oCancelButton On_Key kCancel Send Close_Panel //**************************************************************************** // $Module type: FUNCTION // $Module name: ChosenType // $Author : Vincent Oorsprong // Created : 17/09/98 @ 16:57 // // Description // This function returns the chosen type // // $Rev History // 17/09/98 VO Module header created //**************************************************************************** Function ChosenType Returns Integer Integer iType Get piChosenType To iType Function_Return iType End_Function // ChosenType //**************************************************************************** // $Module type: PROCEDURE // $Module name: DoUserSelectType // $Author : Vincent Oorsprong // Created : 17/09/98 @ 17:03 // // Description // This method will reset the property that holds the chosen type // // $Rev History // 17/09/98 VO Module header created //**************************************************************************** Procedure DoUserSelectType Integer iType Set piChosenType To -1 Set Current_Item Of oTypesList To (iType - 1) Send Popup_Modal End_Procedure // DoUserSelectType //AB-StoreEnd End_Object // oAddresseeTypePanel //AB/ End_Object // prj