//TH-Header //***************************************************************************************** // Copyright (c) 2014 KURANT Project // All rights reserved. // // $FileName : seldatat.dg // $ProjectName : The Hammer 2.0 // $Authors : Wil van Antwerpen, Michael Kurz, Sergey V. Natarov, Bernhard Ponemayr // $Created : 01.25.2014 01:08 // $Type : LGPL // // Contents: Select Data Type // //***************************************************************************************** //TH-RevisionStart //TH-RevisionEnd // Project Object Structure // oSelectDataType is a ModalPanel // oList is a List // oOK_btn is a Button // oCancel_btn is a Button // Register all objects Register_Object oCancel_btn Register_Object oList Register_Object oOK_btn Register_Object oSelectDataType Use DFAllEnt.pkg Object oSelectDataType is a ModalPanel property integer invoking_object_id 0 Set Label to "Select Data Type" Set Size to 125 181 Set Location to 6 7 Object oList is a List Set Size to 100 104 Set Location to 5 9 On_Key kCancel Send Close_Panel Procedure fill_list send delete_data send Add_item 0 'Boolean' send Add_item 0 'Color' send add_item 0 'Complex' send add_item 0 'Date' send add_item 0 'Integer' send add_item 0 'Mode' send add_item 0 'Number' send add_item 0 'String' end_procedure End_Object // oList Object oOK_btn is a Button Set Label to "OK" Set Default_State to TRUE Set Location to 7 119 Procedure onClick integer ho imax iItem hoInv string sVal get oList to ho move (item_count(ho)-1) to imax For iItem From 0 to iMax if (select_state(ho, iItem)) Begin if sVal ne '' append sVal '+' append sVal (value(ho, iItem)) End Loop get invoking_object_id to hoInv set value of hoInv item (current_item(hoInv)) to sVal send close_panel End_Procedure End_Object // oOK_btn Object oCancel_btn is a Button Set Label to "Cancel" Set Location to 25 119 Procedure onclick send close_panel End_Procedure End_Object // oCancel_btn Procedure popup integer hFoc iItem ho string sVal get focus to hFoc set invoking_object_id to hFoc get value of hFoc item (current_item(hFoc)) to sVal get oList to ho send fill_list to ho get item_matching of ho sVal to iItem if iItem ne -1 begin set current_item of ho to iItem set select_state of ho item iItem to true end forward send popup End_Procedure End_Object // oSelectDataType