** ****************************************************************************************** * **EndUser4gl : Exemple d'un langage de 4 ème génération ** ******************************************************************************************* ** ** :LVS_REPORT & :LVS_EDITLABELS : STANDARD EDIT ALL ROWS ** #include "c:\EndUser4gl\4gl\hlp\IncludeSysEU\includesyseu.h" integer : exit_trans1 ,x,Ival,item1,Icol,step ; char : texte1:128 := "Itemxxcccccccccccc",table: wordNumeric:128 occurs 2,value1:256; begin_transaction : Trans1 Execute Transaction with exit_trans1 != 1 begin_dialog WinExtendstyle : :WS_EX_DLGMODALFRAME Winstyle : :WS_OVERLAPPED & :WS_CAPTION & :WS_SYSMENU & :WS_THICKFRAME & :WS_MINIMIZEBOX & :WS_MAXIMIZEBOX 100,50,800,340 , " EndUser LISTVIEW : REPORT and EDIT ALL ITEMS (use FrameWork) ",UserDialog /* ----> STANDARD EDIT ALL ROWS */ ListView : :LVS_REPORT & :LVS_EDITLABELS 1,1,700, 180, ListView1 create : column 1 : "Nom ", column 2 : "Prénom", column 3 : "adresse ", column 4 : "code Postal", column 5 : "Ville " , use FrameWork PushIcon 10, 230, 50,34, ICON_HAND , BoutonCancel Create : Info " Bye Bye........." end_dialog Begin_Initialize IconDialog(UserDialog:"c:\EndUser4gl\4gl\hlp\pgmicon\19.ico"); do(10) begin /* Add item ligne in ListView */ AddItemLV(ListView1:1,""); SetItemLV(ListView1:2,""); /* modif Item ligne existante */ SetItemLV(ListView1:3,""); SetItemLV(ListView1:4,""); SetItemLV(ListView1:5,""); end_begin ; end_do; SetFonts(ListView1: 16, 12, 0, 0,FW_NORMAL, 0,0, 0, ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, FF_SWISS, "Arial") ; End_Initialize OpenDialog (UserDialog) ; InputData(); /* Cancel Transaction **************************************************** */ require GetPush(BoutonCancel) returning (x); if( x Not_Void ) then MsgBox : TITLE "My First ListView" Message : " Push is ok : Cancel Transaction" button : MB_OK icon : MB_ICONEXCLAMATION returning (x) ; exit_trans1 := 1 ; end_if; /* Select List View ************************************* */ /* 1 first method : if Clik mouse on list view ************** */ begin GetSelectItemLV(ListView1) returning (item1,icol); if(item1 Not_Void ) then GetItemTextLV(ListView1:item1,Icol) returning (value1); display "Texte : Ligne : ",item1," Colonne :",Icol ," Valeur :",value1 ; end_if; end_begin ; end_transaction ;