JohnBailey Posted September 4, 2007 Share Posted September 4, 2007 eltorro, what did you think of what I was doing to pull the data?#398257 A decision is a powerful thing Link to comment Share on other sites More sharing options...
eltorro Posted September 4, 2007 Author Share Posted September 4, 2007 What version of AutoIt are you using? I don't have ControlConstants.au3 Regards, [indent]ElTorro[/indent][font="Book"] Decide, Commit, Achieve[/font]_ConfigIO.au3Language Translation --uses Google(tm) MsgBox Move XML wrapper UDF XML2TreeView Zip functionality Split your GUI Save Print ScreenZipPluginEdit In Place listviewSome of my scripts on Google code Link to comment Share on other sites More sharing options...
JohnBailey Posted September 4, 2007 Share Posted September 4, 2007 What version of AutoIt are you using? I don't have ControlConstants.au3 crud sorry that's mine here it is below. I created it because I used the consts not just in the udfs others have developed, plus it resolves the issue of others using the same consts in their udfs. It gives you an annoying warning/error when doing a syntax check, but it's a bit of a "false positive" expandcollapse popup#include-once ;Window Events If Not IsDeclared('WM_NOTIFY') Then Global Const $WM_NOTIFY = 0x004E If Not IsDeclared('WM_COMMAND') Then Global Const $WM_COMMAND = 0x0111 If Not IsDeclared('WM_KEYDOWN') Then Global Const $WM_KEYDOWN = 0x100 If Not IsDeclared('WM_COPYDATA') Then Global Const $WM_COPYDATA = 0x4A ;ListView Events If Not IsDeclared('NM_FIRST') Then Global Const $NM_FIRST = 0 If Not IsDeclared('NM_LAST') Then Global Const $NM_LAST = (-99) If Not IsDeclared('NM_OUTOFMEMORY') Then Global Const $NM_OUTOFMEMORY = ($NM_FIRST - 1) If Not IsDeclared('NM_CLICK') Then Global Const $NM_CLICK = ($NM_FIRST - 2) If Not IsDeclared('NM_DBLCLK') Then Global Const $NM_DBLCLK = ($NM_FIRST - 3) If Not IsDeclared('NM_RETURN') Then Global Const $NM_RETURN = ($NM_FIRST - 4) If Not IsDeclared('NM_RCLICK') Then Global Const $NM_RCLICK = ($NM_FIRST - 5) If Not IsDeclared('NM_RDBLCLK') Then Global Const $NM_RDBLCLK = ($NM_FIRST - 6) If Not IsDeclared('NM_SETFOCUS') Then Global Const $NM_SETFOCUS = ($NM_FIRST - 7) If Not IsDeclared('NM_KILLFOCUS') Then Global Const $NM_KILLFOCUS = ($NM_FIRST - 8) If Not IsDeclared('NM_CUSTOMDRAW') Then Global Const $NM_CUSTOMDRAW = ($NM_FIRST - 12) If Not IsDeclared('NM_HOVER') Then Global Const $NM_HOVER = ($NM_FIRST - 13) If Not IsDeclared('NM_NCHITTEST') Then Global Const $NM_NCHITTEST = ($NM_FIRST - 14) If Not IsDeclared('NM_KEYDOWN') Then Global Const $NM_KEYDOWN = ($NM_FIRST - 15) If Not IsDeclared('NM_RELEASEDCAPTURE') Then Global Const $NM_RELEASEDCAPTURE = ($NM_FIRST - 16) If Not IsDeclared('NM_SETCURSOR') Then Global Const $NM_SETCURSOR = ($NM_FIRST - 17) If Not IsDeclared('NM_CHAR') Then Global Const $NM_CHAR = ($NM_FIRST - 18) If Not IsDeclared('NM_TOOLTIPSCREATED') Then Global Const $NM_TOOLTIPSCREATED = ($NM_FIRST - 19) ;Edit Events Global Const $EN_CHANGE = 0x300 Global Const $EN_SETFOCUS = 0x100 Global Const $EN_KILLFOCUS = 0x200 ;ComboBox Events Global Const $CBN_EDITCHANGE = 5 Global Const $CBN_SELCHANGE = 1 Global Const $CBN_EDITUPDATE = 6 Global Const $CBN_KILLFOCUS = 4 Global Const $CBN_SETFOCUS = 3 A decision is a powerful thing Link to comment Share on other sites More sharing options...
eltorro Posted September 5, 2007 Author Share Posted September 5, 2007 @JohnBailey, Post an example if you got one. Regards, [indent]ElTorro[/indent][font="Book"] Decide, Commit, Achieve[/font]_ConfigIO.au3Language Translation --uses Google(tm) MsgBox Move XML wrapper UDF XML2TreeView Zip functionality Split your GUI Save Print ScreenZipPluginEdit In Place listviewSome of my scripts on Google code Link to comment Share on other sites More sharing options...
silvano Posted September 5, 2007 Share Posted September 5, 2007 i have done this func to check the item selected expandcollapse popupFunc checked() Dim $DD, $WW For $DD = 0 to _GUICtrlListViewGetItemCount($ListView) -1 If _GUICtrlListViewGetCheckedState($ListView,$DD) Then $WW = $WW + 1 EndIf Next If $WW < 1 Then MsgBox(0,"Attenzione!","not checked!") Else esegui($ListView) EndIf EndFunc Func esegui($cheLista) Global $array_split Local $MM = 0 Local $PP = 0 Local $n_list = 0 Local $RR = 0 Local $NN = 0 Local $a_Item Local $totali ; conto record checcati ; check record checked For $MM = 0 to _GUICtrlListViewGetItemCount($cheLista) -1 If _GUICtrlListViewGetCheckedState($cheLista,$MM) Then $a_Item = _GUICtrlListViewGetItemTextArray ($cheLista, $PP) If (Not IsArray($a_Item)) Then MsgBox(0,"","not array") Return 0 Else $totali = "" For $i = 1 To $a_Item[0] $totali = $totali&$a_Item[$i]&"|" $RR = $RR+1 Next $array_split = "" $array_split = StringSplit(stringtrimright($totali,1),"|") _ArrayDelete( $array_split,0) _ArrayDisplay($array_split) EndIf EndIf Next Return 1 EndFuncoÝ÷ Ú+p¢¹0ØbØ^¨§~éÜjëh×6 Global $buttonOK = GUICtrlCreateButton("check",150,$guih-50,90,25) GUICtrlSetOnEvent($buttonOK,"checked") and set Global $ListView, not Local this is smart solution? i have one question, can i set default data in the combo box? like this: GUICtrlSetData($lvCombo, $c,"default value") tks Link to comment Share on other sites More sharing options...
silvano Posted September 5, 2007 Share Posted September 5, 2007 i have now download fixed EIPListView.zip but i have found a little bug when i send double click to the edit and i drugout the gui with mouse, the edit show out of the gui sorry for my bad english... watch the attached image Link to comment Share on other sites More sharing options...
silvano Posted September 5, 2007 Share Posted September 5, 2007 excused for my continuous query, but is for me very nice script and i would to use it to the maximum if this is not the just place to post my query please you say it to me can i set new data combo in the cicle, for next? like this, but don't work Local $c For $i = 1 To 18 $c = $c & Chr($i+66) & "|" ; popola combo per esempio ;_GUICtrlListViewSetColumnWidth($ListView, $i, $LVSCW_AUTOSIZE) GUICtrlCreateListViewItem("Cognome Nome|COD Fiscale|Via|Città|CAP|Prov.|ABI|CAB|CC||Importo", $ListView) GUICtrlSetData($lvCombo, "") Local $campiCombo = $i&"one|two|more" GUICtrlSetData($lvCombo, $campiCombo) Next Link to comment Share on other sites More sharing options...
eltorro Posted September 5, 2007 Author Share Posted September 5, 2007 ... and set Global $ListView, not Localthis is smart solution?i have one question, can i set default data in the combo box?like this: GUICtrlSetData($lvCombo, $c,"default value")tksSetting $ListView to Global should not cause problems. Likewise with GuiCtrlSetData($lvCombo,$c "default value") Regards, [indent]ElTorro[/indent][font="Book"] Decide, Commit, Achieve[/font]_ConfigIO.au3Language Translation --uses Google(tm) MsgBox Move XML wrapper UDF XML2TreeView Zip functionality Split your GUI Save Print ScreenZipPluginEdit In Place listviewSome of my scripts on Google code Link to comment Share on other sites More sharing options...
eltorro Posted September 5, 2007 Author Share Posted September 5, 2007 i have now download fixed EIPListView.zipbut i have found a little bugwhen i send double click to the edit and i drugout the gui with mouse, the edit show out of the guisorry for my bad english...watch the attached imageHmm, It should hide itself when the gui gets focus. I'll have a look. Regards, [indent]ElTorro[/indent][font="Book"] Decide, Commit, Achieve[/font]_ConfigIO.au3Language Translation --uses Google(tm) MsgBox Move XML wrapper UDF XML2TreeView Zip functionality Split your GUI Save Print ScreenZipPluginEdit In Place listviewSome of my scripts on Google code Link to comment Share on other sites More sharing options...
silvano Posted September 5, 2007 Share Posted September 5, 2007 Setting $ListView to Global should not cause problems. Likewise with GuiCtrlSetData($lvCombo,$c "default value")sorry...i don't see the value of default combo, don't disply it in the listview i have just set listview and lvCombo to global...--> GuiCtrlSetData($lvCombo,$c, "default value")in the combo box don't display "default value" but only value of c$tks Link to comment Share on other sites More sharing options...
eltorro Posted September 5, 2007 Author Share Posted September 5, 2007 excused for my continuous query, but is for me very nice script and i would to use it to the maximum if this is not the just place to post my query please you say it to me can i set new data combo in the cicle, for next? like this, but don't work Local $c For $i = 1 To 18 $c = $c & Chr($i+66) & "|" ; popola combo per esempio ;_GUICtrlListViewSetColumnWidth($ListView, $i, $LVSCW_AUTOSIZE) GUICtrlCreateListViewItem("Cognome Nome|COD Fiscale|Via|Città|CAP|Prov.|ABI|CAB|CC||Importo", $ListView) GUICtrlSetData($lvCombo, "") Local $campiCombo = $i&"one|two|more" GUICtrlSetData($lvCombo, $campiCombo) Next Two things: First -- $campiCombo is being redeclared each time through the loop. Try: Local $campiCombo ;before loop. $campiComb &= $i & "|" & "uno|dos|mas" Second -- make sure that _InitEditLib is called before the GuiCtrlSetData statements. Regards, [indent]ElTorro[/indent][font="Book"] Decide, Commit, Achieve[/font]_ConfigIO.au3Language Translation --uses Google(tm) MsgBox Move XML wrapper UDF XML2TreeView Zip functionality Split your GUI Save Print ScreenZipPluginEdit In Place listviewSome of my scripts on Google code Link to comment Share on other sites More sharing options...
eltorro Posted September 5, 2007 Author Share Posted September 5, 2007 sorry...i don't see the value of default combo, don't disply it in the listview i have just set listview and lvCombo to global...--> GuiCtrlSetData($lvCombo,$c, "default value")in the combo box don't display "default value" but only value of c$tksCan you post your script? Regards, [indent]ElTorro[/indent][font="Book"] Decide, Commit, Achieve[/font]_ConfigIO.au3Language Translation --uses Google(tm) MsgBox Move XML wrapper UDF XML2TreeView Zip functionality Split your GUI Save Print ScreenZipPluginEdit In Place listviewSome of my scripts on Google code Link to comment Share on other sites More sharing options...
silvano Posted September 5, 2007 Share Posted September 5, 2007 ies, this is my test script this work with _EIPListView.au3 not last fixed and Global $bLVUPDATEonfocusCHANGE = 1 expandcollapse popup#include <GuiConstants.au3> #include <_EIPListView.au3> #AutoIt3Wrapper_AU3Check_Parameters= -q -d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w 7 global $count =0 ;=============================================================================== ; Name : ListViewEIP ; Description : An example of editing a ListView by overlaying editing controls. ; : ; Requirement(s) : _EIPListView.au3 ; : ; : ; Author(s) : Stephen Podhajecki <gehossafats at netmdc.com/> ; Note(s) : ;=============================================================================== Global $Checkbox1,$Checkbox2,$HelpContext;,$Status1,$Status2 Opt("GUICloseOnESC", 0);turn off exit on esc. Opt("GUIOnEventMode", 1) Func esegui() Dim $DD, $WW For $DD = 0 to _GUICtrlListViewGetItemCount($ListView) -1 If _GUICtrlListViewGetCheckedState($ListView,$DD) Then $WW = $WW + 1 EndIf Next ; se non trovo occorrenze selezionate avviso e continuo loop If $WW < 1 Then MsgBox(0,"Attenzione!","Occorre selezionare una occorrenza!") Else generaLIST($ListView) ;MsgBox(0,"","Selezionati") EndIf EndFunc Func generaLIST($cheLista) Local $MM, $PP, $RR, $n_list $MM = 0 $PP = 0 $n_list = 0 $RR = 0 $NN = 0 ; conto record checcati For $MM = 0 to _GUICtrlListViewGetItemCount($cheLista) -1 If _GUICtrlListViewGetCheckedState($cheLista,$MM) Then $n_list = $n_list + 1 EndIf Next ;MsgBox(0,"",$n_list) Local $array_mandati[$n_list] ;MsgBox(0,"",$n_list) For $PP = 0 to _GUICtrlListViewGetItemCount($cheLista) -1 If _GUICtrlListViewGetCheckedState($cheLista,$PP) Then Local $a_Item = _GUICtrlListViewGetItemTextArray ($cheLista, $PP) If (Not IsArray($a_Item)) Then ;GUICtrlSetData($Status, "Invalid Item #") Else Local $totali = "" For $i = 1 To $a_Item[0] ;MsgBox(0, "Passed Item Index only", "SubItem[" & $i & "] = " & $a_Item[$i]) If $i == 10 Then $a_Item[$i] = GUICtrlRead($lvCombo) If $a_Item[10] == "" Then Return MsgBox(0,"","Mappaggio NON selezionato per: "&$a_Item[1]) $totali = $totali&$a_Item[$i]&"|" $RR = $RR+1 Next Global $array_split = "" $array_split = StringSplit(stringtrimright($totali,1),"|") _ArrayDelete( $array_split,0) _ArrayDisplay($array_split) EndIf ;$array_mandati[$RR] = _GUICtrlListViewGetItemText($cheLista,$PP,0) ;MsgBox(0,"",$array_mandati[$RR]) EndIf Next EndFunc ;#include "..\allegati.au3" _Main() Func _Main() ; ======>>> set the type of control for each column <<<====== ;0= ignore, 1= edit, 2= combo, 4= calendar, 256= use callback. Global $LVcolControl[11] = [1,1,1,1,1,1,1,1,1,2,1] ;left click actions ;0 = ignore, 1= use context callback ;Global $LVcolRControl[11]= [256,256,256,0,0,0,0,0,0,0,0] ; right click actions Global $LVcolRControl[11]= [0,0,0,0,0,0,0,0,0,0,0] ; right click actions _SetLvCallBack("MyCallBack") ;set callback function _SetLvContext ("MyContext") ;set context fuction Local $guiw= 750 Local $guih= 570 ;Local $deskh= @DesktopHeight - _GetTaskBarHeight() ;Local $aWinPos[4]=[(@DesktopWidth-$guiw)/2,($deskh-$guih)/2,750,570] $Gui = GUICreate("Allegati",$guiw,$guih,-1,-1);, 424, 280, 200, 110) GUISetOnEvent($GUI_EVENT_CLOSE, "OnExit") ;--------------------------------------------- ;create the editing controls before the ListView. _InitEditLib ("","","","Whatever");<<<====== add this BEFORE your ListView <<<====== ;--------------------------------------------- Global $ListView = GUICtrlCreateListView("Edit|Edit1|Edit2|Edit3|Edit4|Edit5|Edit6|Edit7|Edit8|COMBO|Edit9", 3, 250, $guiw-6, $guih-300) GUICtrlSendMsg($ListView, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_CHECKBOXES, $LVS_EX_CHECKBOXES) GUICtrlSendMsg($ListView, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_GRIDLINES, $LVS_EX_GRIDLINES) _GUICtrlListViewSetColumnWidth($ListView, 0, $LVSCW_AUTOSIZE) $__LISTVIEWCTRL = $ListView Global $riceviDati = GUICtrlCreateButton("Ricevi",30,$guih-40,100,25,0) ;GUICtrlSetOnEvent($riceviDati, "riceviDati") GUICtrlSetOnEvent($riceviDati, "esegui") ;$Checkbox1 = GUICtrlCreateCheckbox("Update On Focus Change", 30, $guih-75, 147, 17) ;GUICtrlSetTip($Checkbox1, "Checking this box means that if a cell is being actively edited" & @LF & _ ; "and another cell is clicked, the edited cell is updated with the new data." & @LF & _ ; "If unchecked, the original data is preserved.") ;GUICtrlSetOnEvent($Checkbox1, "SetUpdateOptions") ;$Checkbox2 = GUICtrlCreateCheckbox("DblClick to Init Edit ", 30,$guih-50, 147, 17) ;GUICtrlSetTip($Checkbox2, "Checking this box means that one must double click the cell to get the edit control.") ;GUICtrlSetOnEvent($Checkbox2, "SetUpdateOptions") ;Local $Status1 = GUICtrlCreateLabel("", 1, $guih-17, $guiw/2, 17, $SS_SUNKEN) ;Local $Status2 = GUICtrlCreateLabel("", ($guiw/2)+2, $guih-17,($guiw/2)-2 , 17, $SS_SUNKEN) ; Populate list and make it wide enough to see ;======>>> Populate controls with test data<<<====== ;GUICtrlSetOnEvent($lvList,"lvListHandler") ;GuiCtrlSetData($lvList,"Something|Nothing|Other|Nada|Zip|Ziltch|A Lot|Mucho|Smidge|Pinch"); <<<====== populate list. GUICtrlSetOnEvent($__LISTVIEWCTRL,"lvListViewHandler") GUICtrlCreateListViewItem("Silvano|test|test1|test2|test3|test4|test5|test6|test7||test9", $ListView) Local $campiCombo ;before loop. Local $c For $i = 1 To 18 $c = $c & Chr($i+66) & "|" ; popola combo per esempio ;_GUICtrlListViewSetColumnWidth($ListView, $i, $LVSCW_AUTOSIZE) GUICtrlCreateListViewItem("Silvano "&$i&"|test|test1|test2|test3|test4|test5|test6|test7||test9", $ListView) GUICtrlSetData($lvCombo, "") $campiCombo = "" ; $campiCombo &= $i & "|" & "uno|dos|mas" $campiCombo = $i&" Primo|secondo|terzo|quarto" ;$campiCombo & $i = $i&"Primo|secondo|terzo|quarto" GUICtrlSetData($lvCombo, $campiCombo,"secondo") ; --->>> secondo is not display when i lunch the script but only when i press the combo box <<<----- Next ;silvano comment ;$c = StringTrimRight($c, 1) ;GUICtrlSetData($lvCombo, $c) ; fine silvano comment GUICtrlSendMsg($ListView, 0x101E, 0, 200);$listview, LVM_SETCOLUMNWIDTH, 0, resize to widest value ;GUICtrlSendMsg($ListView, 0x101E, 1, 100 );$listview, LVM_SETCOLUMNWIDTH, 0, resize to widest value ;GUICtrlSendMsg($ListView, 0x101E, 2, 100);$listview, LVM_SETCOLUMNWIDTH, 0, resize to widest value ;======>>> End Populate <<<====== $__LISTVIEWCTRL = $ListView ;<<<====== Set $__LISTVIEWCTRL to the ctrlID of the ListView control ;WinSetTrans($Gui,"",0) ;WinMove($Gui,"",1,@DesktopHeight) GUISetState(@SW_SHOW,$Gui) ;_AnimateWindow($Gui,$aWinPos) ;_AnimateWindowEnter($gui) ConsoleWrite("Initiate Done."&@LF) While 1 _MonitorEditState ($editCtrl, $editFlag, $__LISTVIEWCTRL, $LVINFO);<<<====== add this in your message loop<<<====== if $bCALLBACK_EVENT = True Then $bCALLBACK_EVENT = False Call($LVCALLBACK,$LVINFO) EndIf ;Local $statMsg1 = StringFormat("Row: %s Col: %s Ckd: %s", $LVINFO[8]&@TAB, $LVINFO[9]&@TAB,$LVCHECKEDCNT) ;Local $statMsg2 = StringFormat("Update: %s DblClick: %s",$bLVUPDATEonfocusCHANGE,$bLVEDITondblclick) ;If GUICtrlRead($Status1) <> $statMsg1 Then GUICtrlSetData($Status1, $statMsg1) ;If GUICtrlRead($Status2) <> $statMsg2 Then GUICtrlSetData($Status2, $statMsg2) Sleep(25) WEnd _TermEditLib ();<<<====== add this after your message loop<<<====== EndFunc ;==>_Main Func _AnimateWindowEnter($gui) WinMove($Gui,"",1,1,1,1) EndFunc Func OnExit() _TermEditLib () _AnimateWindow($Gui,WinGetPos($Gui),1) Exit EndFunc ;==>OnExit Func SetUpdateOptions() $bLVUPDATEonfocusCHANGE= (BitAND(GUICtrlRead($Checkbox1), $GUI_CHECKED) = $GUI_CHECKED) $bLVEDITondblclick = (BitAND(GUICtrlRead($Checkbox2), $GUI_CHECKED) = $GUI_CHECKED) EndFunc ;==>SetAutoUpdate Func MyCallBack($aLVInfo) _ArrayDisplay($aLVInfo,"LV Info") Local $lvProgress = GUICtrlCreateProgress($aLVInfo[2],$aLVINFO[3]+3,$aLVINFO[4],$aLVINFO[5]-8) For $x = 0 to 100 GUICtrlSetData($lvProgress,$x) Sleep(50) Next GUICtrlDelete($lvProgress) Return 1 EndFunc Func MyContext($aLVInfo) Local $ret =0,$oldText ;create context menu on demand. ;---------------------------------------------------------------------------------------------- If $DebugIt Then ConsoleWrite(_DebugHeader(StringFormat("MyContext Row:%d Col:%d",$aLVInfo[0],$aLVInfo[1]))) ;---------------------------------------------------------------------------------------------- If ($aLVInfo[0] <0 or $aLVInfo[1] <0) Then Return Local $HelpCtx[7] $HelpCtx[0]= GUICtrlCreateDummy() $HelpCtx[1]= GUICtrlCreateContextMenu($HelpCtx[0]) $HelpCtx[2]= GUICtrlCreateMenuItem("String Upper", $HelpCtx[1]) $HelpCtx[3]= GUICtrlCreateMenuItem("", $HelpCtx[1]) $HelpCtx[4]= GUICtrlCreateMenuItem("String Lower", $HelpCtx[1]) $HelpCtx[5]= GUICtrlCreateMenuItem("", $HelpCtx[1]) $HelpCtx[6]= GUICtrlCreateMenuItem("About...", $HelpCtx[1]) GUISetState(@SW_SHOW) Local $hMenu = GUICtrlGetHandle($HelpCtx[1]) ClientToScreen(WinGetHandle($Gui), $aLVInfo[2], $aLVInfo[3]) Local $ctx = TrackPopupMenu(WinGetHandle($Gui), $hMenu,$aLVInfo[2], $aLVInfo[3]) ;---------------------------------------------------------------------------------------------- If $DebugIt Then ConsoleWrite(_DebugHeader("MenuItem="&$ctx )) ;---------------------------------------------------------------------------------------------- ;; do something with the result. Switch $ctx Case $HelpCtx[2] $oldText = _GUICtrlListViewGetItemText($__LISTVIEWCTRL, $aLVInfo[0],$aLVInfo[1]) $ret = _GUICtrlListViewSetItemText($__LISTVIEWCTRL, $aLVInfo[0],$aLVInfo[1],StringUpper($oldText)) Case $HelpCtx[4] $oldText = _GUICtrlListViewGetItemText($__LISTVIEWCTRL, $aLVInfo[0],$aLVInfo[1]) $ret = _GUICtrlListViewSetItemText($__LISTVIEWCTRL, $aLVInfo[0],$aLVInfo[1],StringLower($oldText)) Case $HelpCtx[6] MsgBox(266288,"EIP ListView","Called from context menu.") EndSwitch ;; clean up the context menu. For $x =0 to UBound($HelpCtx)-1 GUICtrlDelete($HelpCtx[$x]) Next Return $ret EndFunc ;;;ripped from help file. ; Convert the client (GUI) coordinates to screen (desktop) coordinates Func ClientToScreen($hWnd, ByRef $x, ByRef $y) Local $stPoint = DllStructCreate("int;int") DllStructSetData($stPoint, 1, $x) DllStructSetData($stPoint, 2, $y) DllCall("user32.dll", "int", "ClientToScreen", "hwnd", $hWnd, "ptr", DllStructGetPtr($stPoint)) $x = DllStructGetData($stPoint, 1) $y = DllStructGetData($stPoint, 2) ; release Struct not really needed as it is a local $stPoint = 0 EndFunc ; added TPM_RETURNCMD to uflags to get menu item return value. ; Show at the given coordinates (x, y) the popup menu (hMenu) which belongs to a given GUI window (hWnd) Func TrackPopupMenu($hWnd, $hMenu, $x, $y) Local $v_ret = DllCall("user32.dll", "int", "TrackPopupMenuEx", "hwnd", $hMenu, "int",0X100, "int", $x, "int", $y, "hwnd", $hWnd, "ptr", 0) Return $v_ret[0] EndFunc Func lvListHandler() ConsoleWrite("List control handler"&@LF) If $bLVDBLCLICK Then ConsoleWrite("DblClick"&@LF) $bLVDBLCLICK = False Else ConsoleWrite("Click"&@LF) EndIf EndFunc Func lvListViewHandler() ConsoleWrite("lvListViewHandler>>"&@LF) EndFunc Func _AnimateWindow($hWnd,$aPos,$iFlag=0) if $hWnd = 0 Then Return 0 If IsArray($aPos) Then If Ubound($aPos) <> 4 then Return 0 EndIf ;Local $hstep, $wstep, Local $tstep, $lstep if $iFlag Then ;$hstep = $aPos[3] /50 ;$wstep = $aPos[2]/50 $tstep = (@DesktopHeight-$aPos[1]) /50 $lstep = $aPos[0] /50 For $x =50 to 0 step -.5 WinMove($Gui,"",$lstep*$x,@DesktopHeight -($tstep*$x),$aPos[2]/4,$aPos[3]/4) Next Else WinMove($Gui,"",1,1,1,1) ;$hstep = $aPos[3] /50 ;$wstep = $aPos[2]/50 $tstep = (@DesktopHeight-$aPos[1]) /50 $lstep = $aPos[0] /50 For $x =0 to 50 step .5 WinMove($Gui,"",$lstep*$x,@DesktopHeight -($tstep*$x),$aPos[2]/4,$aPos[3]/4) Next WinMove($Gui,"",$aPos[0],$aPos[1],$aPos[2],$aPos[3]) EndIf Return EndFunc Func _GetTaskBarHeight() Local $oldOpt = Opt("WinTitleMatchMode",4) Local $TrayPos = WinGetPos("classname=Shell_TrayWnd") Opt("WinTitleMatchMode",$oldOpt) Return $TrayPos[3] EndFunc Func _ShowProgress() EndFunc Link to comment Share on other sites More sharing options...
eltorro Posted September 6, 2007 Author Share Posted September 6, 2007 Fixed control not moving with GUI. @silvano, Try this arrangement of your script. expandcollapse popup#include <GuiConstants.au3> #include <user/_EIPListView.au3> #AutoIt3Wrapper_AU3Check_Parameters= -q -d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w 7 Global $count = 0 ;=============================================================================== ; Name : ListViewEIP ; Description : An example of editing a ListView by overlaying editing controls. ; : ; Requirement(s) : _EIPListView.au3 ; : ; : ; Author(s) : Stephen Podhajecki <gehossafats at netmdc.com/> ; Note(s) : ;=============================================================================== Global $Checkbox1, $Checkbox2, $HelpContext, $ListView;,$Status1,$Status2 Opt("GUICloseOnESC", 0);turn off exit on esc. Opt("GUIOnEventMode", 1) Func esegui() Local $DD, $WW For $DD = 0 To _GUICtrlListViewGetItemCount($ListView) - 1 If _GUICtrlListViewGetCheckedState($ListView, $DD) Then $WW = $WW + 1 EndIf Next ; se non trovo occorrenze selezionate avviso e continuo loop If $WW < 1 Then MsgBox(0, "Attenzione!", "Occorre selezionare una occorrenza!") Else generaLIST($ListView) ;MsgBox(0,"","Selezionati") EndIf EndFunc ;==>esegui Func generaLIST($cheLista) Local $MM, $PP, $RR, $n_list;, $NN $MM = 0 $PP = 0 $n_list = 0 $RR = 0 ; $NN = 0 ; conto record checcati For $MM = 0 To _GUICtrlListViewGetItemCount($cheLista) - 1 If _GUICtrlListViewGetCheckedState($cheLista, $MM) Then $n_list = $n_list + 1 EndIf Next ;MsgBox(0,"",$n_list) Local $array_mandati[$n_list] ;MsgBox(0,"",$n_list) For $PP = 0 To _GUICtrlListViewGetItemCount($cheLista) - 1 If _GUICtrlListViewGetCheckedState($cheLista, $PP) Then Local $a_Item = _GUICtrlListViewGetItemTextArray($cheLista, $PP) If (Not IsArray($a_Item)) Then ;GUICtrlSetData($Status, "Invalid Item #") Else Local $totali = "" For $i = 1 To $a_Item[0] ;MsgBox(0, "Passed Item Index only", "SubItem[" & $i & "] = " & $a_Item[$i]) If $i == 10 Then $a_Item[$i] = GUICtrlRead($lvCombo) If $a_Item[10] == "" Then Return MsgBox(0, "", "Mappaggio NON selezionato per: " & $a_Item[1]) $totali = $totali & $a_Item[$i] & "|" $RR = $RR + 1 Next Global $array_split = "" $array_split = StringSplit(StringTrimRight($totali, 1), "|") _ArrayDelete($array_split, 0) _ArrayDisplay($array_split) EndIf $array_mandati[$RR] = _GUICtrlListViewGetItemText($cheLista,$PP,0) MsgBox(0,"",$array_mandati[$RR]) EndIf Next EndFunc ;==>generaLIST ;#include "..\allegati.au3" _Main() Func _Main() ; ======>>> set the type of control for each column <<<====== ;0= ignore, 1= edit, 2= combo, 4= calendar, 256= use callback. Global $LVcolControl[11] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1] ;left click actions ;0 = ignore, 1= use context callback ;Global $LVcolRControl[11]= [256,256,256,0,0,0,0,0,0,0,0] ; right click actions Global $LVcolRControl[11] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] ; right click actions _SetLvCallBack ("MyCallBack") ;set callback function _SetLvContext ("MyContext") ;set context fuction Local $guiw = 750 Local $guih = 570 ;Local $deskh= @DesktopHeight - _GetTaskBarHeight() ;Local $aWinPos[4]=[(@DesktopWidth-$guiw)/2,($deskh-$guih)/2,750,570] $Gui = GUICreate("Allegati", $guiw, $guih, -1, -1);, 424, 280, 200, 110) GUISetOnEvent($GUI_EVENT_CLOSE, "OnExit") $ListView = GUICtrlCreateListView("Edit|Edit1|Edit2|Edit3|Edit4|Edit5|Edit6|Edit7|Edit8|COMBO|Edit9", 3, 250, $guiw - 6, $guih - 300) GUICtrlSendMsg($ListView, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_CHECKBOXES, $LVS_EX_CHECKBOXES) GUICtrlSendMsg($ListView, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_GRIDLINES, $LVS_EX_GRIDLINES) _GUICtrlListViewSetColumnWidth($ListView, 0, $LVSCW_AUTOSIZE) $__LISTVIEWCTRL = $ListView Global $riceviDati = GUICtrlCreateButton("Ricevi", 30, $guih - 40, 100, 25, 0) ;GUICtrlSetOnEvent($riceviDati, "riceviDati") GUICtrlSetOnEvent($riceviDati, "esegui") ;$Checkbox1 = GUICtrlCreateCheckbox("Update On Focus Change", 30, $guih-75, 147, 17) ;GUICtrlSetTip($Checkbox1, "Checking this box means that if a cell is being actively edited" & @LF & _ ; "and another cell is clicked, the edited cell is updated with the new data." & @LF & _ ; "If unchecked, the original data is preserved.") ;GUICtrlSetOnEvent($Checkbox1, "SetUpdateOptions") ;$Checkbox2 = GUICtrlCreateCheckbox("DblClick to Init Edit ", 30,$guih-50, 147, 17) ;GUICtrlSetTip($Checkbox2, "Checking this box means that one must double click the cell to get the edit control.") ;GUICtrlSetOnEvent($Checkbox2, "SetUpdateOptions") ;Local $Status1 = GUICtrlCreateLabel("", 1, $guih-17, $guiw/2, 17, $SS_SUNKEN) ;Local $Status2 = GUICtrlCreateLabel("", ($guiw/2)+2, $guih-17,($guiw/2)-2 , 17, $SS_SUNKEN) ; Populate list and make it wide enough to see ;======>>> Populate controls with test data<<<====== ;GUICtrlSetOnEvent($lvList,"lvListHandler") ;GuiCtrlSetData($lvList,"Something|Nothing|Other|Nada|Zip|Ziltch|A Lot|Mucho|Smidge|Pinch"); <<<====== populate list. GUICtrlSetOnEvent($__LISTVIEWCTRL, "lvListViewHandler") GUICtrlCreateListViewItem("Silvano|test|test1|test2|test3|test4|test5|test6|test7||test9", $ListView) Local $c, $campiCombo For $i = 1 To 18 $c = $c & Chr($i + 66) & "|" ; popola combo per esempio ;_GUICtrlListViewSetColumnWidth($ListView, $i, $LVSCW_AUTOSIZE) GUICtrlCreateListViewItem("Silvano " & $i & "|test|test1|test2|test3|test4|test5|test6|test7||test9", $ListView) $campiCombo &= $i & "|" Next $campiCombo &= "Primo|secondo|terzo|quarto" ;silvano comment ;$c = StringTrimRight($c, 1) ;GUICtrlSetData($lvCombo, $c) ; fine silvano comment GUICtrlSendMsg($ListView, 0x101E, 0, 200);$listview, LVM_SETCOLUMNWIDTH, 0, resize to widest value ;GUICtrlSendMsg($ListView, 0x101E, 1, 100 );$listview, LVM_SETCOLUMNWIDTH, 0, resize to widest value ;GUICtrlSendMsg($ListView, 0x101E, 2, 100);$listview, LVM_SETCOLUMNWIDTH, 0, resize to widest value ;======>>> End Populate <<<====== $__LISTVIEWCTRL = $ListView ;<<<====== Set $__LISTVIEWCTRL to the ctrlID of the ListView control ;WinSetTrans($Gui,"",0) ;WinMove($Gui,"",1,@DesktopHeight) GUISetState(@SW_SHOW, $Gui) ;************************************************* ;************************************************* ;************************************************* ;--------------------------------------------- _InitEditLib ("", "", "", "Whatever") ;--------------------------------------------- GUICtrlSetData($lvCombo, "") GUICtrlSetData($lvCombo, $campiCombo, "secondo") ;_AnimateWindow($Gui,$aWinPos) ;_AnimateWindowEnter($gui) ConsoleWrite("Initiate Done." & @LF) ;************************************************* ;************************************************* ;************************************************* While 1 _MonitorEditState ($editCtrl, $editFlag, $__LISTVIEWCTRL, $LVINFO);<<<====== add this in your message loop<<<====== If $bCALLBACK_EVENT = True Then $bCALLBACK_EVENT = False Call($LVCALLBACK, $LVINFO) EndIf ;Local $statMsg1 = StringFormat("Row: %s Col: %s Ckd: %s", $LVINFO[8]&@TAB, $LVINFO[9]&@TAB,$LVCHECKEDCNT) ;Local $statMsg2 = StringFormat("Update: %s DblClick: %s",$bLVUPDATEonfocusCHANGE,$bLVEDITondblclick) ;If GUICtrlRead($Status1) <> $statMsg1 Then GUICtrlSetData($Status1, $statMsg1) ;If GUICtrlRead($Status2) <> $statMsg2 Then GUICtrlSetData($Status2, $statMsg2) Sleep(25) WEnd _TermEditLib ();<<<====== add this after your message loop<<<====== EndFunc ;==>_Main Func _AnimateWindowEnter ($Gui) WinMove($Gui, "", 1, 1, 1, 1) EndFunc ;==>_AnimateWindowEnter Func OnExit() _TermEditLib () _AnimateWindow($Gui, WinGetPos($Gui), 1) Exit EndFunc ;==>OnExit Func SetUpdateOptions() $bLVUPDATEonfocusCHANGE = (BitAND(GUICtrlRead($Checkbox1), $GUI_CHECKED) = $GUI_CHECKED) $bLVEDITondblclick = (BitAND(GUICtrlRead($Checkbox2), $GUI_CHECKED) = $GUI_CHECKED) EndFunc ;==>SetUpdateOptions Func MyCallBack($aLVINFO) _ArrayDisplay($aLVINFO, "LV Info") Local $lvProgress = GUICtrlCreateProgress($aLVINFO[2], $aLVINFO[3] + 3, $aLVINFO[4], $aLVINFO[5] - 8) For $x = 0 To 100 GUICtrlSetData($lvProgress, $x) Sleep(50) Next GUICtrlDelete($lvProgress) Return 1 EndFunc ;==>MyCallBack Func MyContext($aLVINFO) Local $ret = 0, $oldText ;create context menu on demand. ;---------------------------------------------------------------------------------------------- If $DebugIt Then ConsoleWrite(_DebugHeader (StringFormat("MyContext Row:%d Col:%d", $aLVINFO[0], $aLVINFO[1]))) ;---------------------------------------------------------------------------------------------- If ($aLVINFO[0] < 0 Or $aLVINFO[1] < 0) Then Return Local $HelpCtx[7] $HelpCtx[0] = GUICtrlCreateDummy() $HelpCtx[1] = GUICtrlCreateContextMenu($HelpCtx[0]) $HelpCtx[2] = GUICtrlCreateMenuItem("String Upper", $HelpCtx[1]) $HelpCtx[3] = GUICtrlCreateMenuItem("", $HelpCtx[1]) $HelpCtx[4] = GUICtrlCreateMenuItem("String Lower", $HelpCtx[1]) $HelpCtx[5] = GUICtrlCreateMenuItem("", $HelpCtx[1]) $HelpCtx[6] = GUICtrlCreateMenuItem("About...", $HelpCtx[1]) GUISetState(@SW_SHOW) Local $hMenu = GUICtrlGetHandle($HelpCtx[1]) Local $xx, $yy ClientToScreen (WinGetHandle($Gui), $xx, $yy) Local $ctx = TrackPopupMenu(WinGetHandle($Gui), $hMenu, $xx + $aLVINFO[2], $yy + $aLVINFO[3]) ;---------------------------------------------------------------------------------------------- If $DebugIt Then ConsoleWrite(_DebugHeader ("MenuItem=" & $ctx)) ;---------------------------------------------------------------------------------------------- ;; do something with the result. Switch $ctx Case $HelpCtx[2] $oldText = _GUICtrlListViewGetItemText($__LISTVIEWCTRL, $aLVINFO[0], $aLVINFO[1]) $ret = _GUICtrlListViewSetItemText($__LISTVIEWCTRL, $aLVINFO[0], $aLVINFO[1], StringUpper($oldText)) Case $HelpCtx[4] $oldText = _GUICtrlListViewGetItemText($__LISTVIEWCTRL, $aLVINFO[0], $aLVINFO[1]) $ret = _GUICtrlListViewSetItemText($__LISTVIEWCTRL, $aLVINFO[0], $aLVINFO[1], StringLower($oldText)) Case $HelpCtx[6] MsgBox(266288, "EIP ListView", "Called from context menu.") EndSwitch ;; clean up the context menu. For $x = 0 To UBound($HelpCtx) - 1 GUICtrlDelete($HelpCtx[$x]) Next Return $ret EndFunc ;==>MyContext ;;;ripped from help file. ; Convert the client (GUI) coordinates to screen (desktop) coordinates ;~ Func ClientToScreen($hWnd, ByRef $x, ByRef $y) ;~ Local $stPoint = DllStructCreate("int;int") ;~ ;~ DllStructSetData($stPoint, 1, $x) ;~ DllStructSetData($stPoint, 2, $y) ;~ DllCall("user32.dll", "int", "ClientToScreen", "hwnd", $hWnd, "ptr", DllStructGetPtr($stPoint)) ;~ ;~ $x = DllStructGetData($stPoint, 1) ;~ $y = DllStructGetData($stPoint, 2) ;~ ; release Struct not really needed as it is a local ;~ $stPoint = 0 ;~ EndFunc ; added TPM_RETURNCMD to uflags to get menu item return value. ; Show at the given coordinates (x, y) the popup menu (hMenu) which belongs to a given GUI window (hWnd) Func TrackPopupMenu($hWnd, $hMenu, $x, $y) Local $v_ret = DllCall("user32.dll", "int", "TrackPopupMenuEx", "hwnd", $hMenu, "int", 0X100, "int", $x, "int", $y, "hwnd", $hWnd, "ptr", 0) Return $v_ret[0] EndFunc ;==>TrackPopupMenu Func lvListHandler() ConsoleWrite("List control handler" & @LF) If $bLVDBLCLICK Then ConsoleWrite("DblClick" & @LF) $bLVDBLCLICK = False Else ConsoleWrite("Click" & @LF) EndIf EndFunc ;==>lvListHandler Func lvListViewHandler() ConsoleWrite("lvListViewHandler>>" & @LF) EndFunc ;==>lvListViewHandler Func _AnimateWindow($hWnd, $aPos, $iFlag = 0) If $hWnd = 0 Then Return 0 If IsArray($aPos) Then If UBound($aPos) <> 4 Then Return 0 EndIf ;Local $hstep, $wstep, Local $tstep, $lstep If $iFlag Then ;$hstep = $aPos[3] /50 ;$wstep = $aPos[2]/50 $tstep = (@DesktopHeight - $aPos[1]) / 50 $lstep = $aPos[0] / 50 For $x = 50 To 0 Step - .5 WinMove($Gui, "", $lstep * $x, @DesktopHeight - ($tstep * $x), $aPos[2] / 4, $aPos[3] / 4) Next Else WinMove($Gui, "", 1, 1, 1, 1) ;$hstep = $aPos[3] /50 ;$wstep = $aPos[2]/50 $tstep = (@DesktopHeight - $aPos[1]) / 50 $lstep = $aPos[0] / 50 For $x = 0 To 50 Step .5 WinMove($Gui, "", $lstep * $x, @DesktopHeight - ($tstep * $x), $aPos[2] / 4, $aPos[3] / 4) Next WinMove($Gui, "", $aPos[0], $aPos[1], $aPos[2], $aPos[3]) EndIf Return EndFunc ;==>_AnimateWindow Func _GetTaskBarHeight() Local $oldOpt = Opt("WinTitleMatchMode", 4) Local $TrayPos = WinGetPos("classname=Shell_TrayWnd") Opt("WinTitleMatchMode", $oldOpt) Return $TrayPos[3] EndFunc ;==>_GetTaskBarHeight Regards, [indent]ElTorro[/indent][font="Book"] Decide, Commit, Achieve[/font]_ConfigIO.au3Language Translation --uses Google(tm) MsgBox Move XML wrapper UDF XML2TreeView Zip functionality Split your GUI Save Print ScreenZipPluginEdit In Place listviewSome of my scripts on Google code Link to comment Share on other sites More sharing options...
silvano Posted September 7, 2007 Share Posted September 7, 2007 (edited) thank you eltorro but i don't send my question correctly and i'am a very stupid!! set combo data default is in the line GUICtrlCreateListViewItem("Silvano "&$i&"|test|test1|test2|test3|test4|test5|test6|test7|"&$i&"|test9", $ListView) and not in the GUICtrlSetData($lvCombo, $campiCombo,$i) sorry for my useless questions W 2K not will ajust the size of the opened combo. I have change this line $lvCombo = GUICtrlCreateCombo($lvComboStart, 0, 0, 1, 1,-1,$WS_EX_TOPMOST) moving gui is fixed but if i change the tab sheet the edit show over of the tab... see the attachment regards Edited September 7, 2007 by silvano Link to comment Share on other sites More sharing options...
martin Posted September 7, 2007 Share Posted September 7, 2007 (edited) Excellent component eltorro. I have a use for this, many thanks. It will turn my current project from 'yeh, looks ok I s'pose' to 'Hey, where did you buy that?' A very small problem. If you double click to start editing, and then when the edit is open you decide to drag the listview titles to adjust the column width I think it would be better if the edit closed. If the column width for the current edit is narrow and you drag the sizing bar to make it wider then the item text behind the edit can come into view at the end of the edit box. Edited September 7, 2007 by martin Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
eltorro Posted September 8, 2007 Author Share Posted September 8, 2007 moving gui is fixed but if i change the tab sheet the edit show over of the tab... see the attachmentregardsFixed.Excellent component eltorro. I have a use for this, many thanks. It will turn my current project from 'yeh, looks ok I s'pose' to 'Hey, where did you buy that?'A very small problem. If you double click to start editing, and then when the edit is open you decide to drag the listview titles to adjust the column width I think it would be better if the edit closed. If the column width for the current edit is narrow and you drag the sizing bar to make it wider then the item text behind the edit can come into view at the end of the edit box.Fixed.See first post for updated version. Regards, [indent]ElTorro[/indent][font="Book"] Decide, Commit, Achieve[/font]_ConfigIO.au3Language Translation --uses Google(tm) MsgBox Move XML wrapper UDF XML2TreeView Zip functionality Split your GUI Save Print ScreenZipPluginEdit In Place listviewSome of my scripts on Google code Link to comment Share on other sites More sharing options...
JohnBailey Posted September 13, 2007 Share Posted September 13, 2007 eltorro, it may just be me but i can't download the recent version. FF keeps giving me a deadlink error. A decision is a powerful thing Link to comment Share on other sites More sharing options...
eltorro Posted September 14, 2007 Author Share Posted September 14, 2007 eltorro, it may just be me but i can't download the recent version. FF keeps giving me a deadlink error.I had an internet outage this afternoon around the time of your post. Please give it a try again. If you have trouble, let me know. Regards, [indent]ElTorro[/indent][font="Book"] Decide, Commit, Achieve[/font]_ConfigIO.au3Language Translation --uses Google(tm) MsgBox Move XML wrapper UDF XML2TreeView Zip functionality Split your GUI Save Print ScreenZipPluginEdit In Place listviewSome of my scripts on Google code Link to comment Share on other sites More sharing options...
JohnBailey Posted September 14, 2007 Share Posted September 14, 2007 (edited) I had an internet outage this afternoon around the time of your post. Please give it a try again. If you have trouble, let me know.Works great now This is seriously amazing and helps so much!! I'm having lots of fun with it, and those who use my apps are so thankful for the ease of use! Your new improvements with v3 are MUCH appreciated by me!Also, is there a reason you didn't include a checkbox control? With that, here are some "requests" Checkbox Control Function to set all columns with a standard right click and left click Exampleexpandcollapse popup;=============================================================================== ; Function Name: _EIPInitAllColumnClicksStandard ; ; Description: Initializes (sets up the arrays for) the column right and left clicks. Therefore, all columns will have the same functions. ; ; Parameter(s): $iaccsTotalColumns - number, The Number of Columns ; $iaccsLeftClickOption - number, Left Click option (default = 1)(other options =;0= ignore, 1= edit, 2= combo, 4= calendar, 256= use callback) ; $iaccsRightClickOption - boolean, Right Click option (default = true) ; ; Requirement(s): ; ; Return Value(s): Sets Globals which are arrays ; ; User CallTip: _EIPInitAllColumnClicksStandard($iaccsTotalColumns[,$iaccsLeftClickOption=1][,$iaccsRightClickOption=256]). Sets up all columns with the same type of control. ; ; Note(s): This is optional and just sets up the array that is called ; ;=============================================================================== Func _EIPInitAllColumnClicksStandard($iaccsTotalColumns,$iaccsLeftClickOption=1,$iaccsRightClickOption=true) ; ======>>> set the type of control for each column <<<====== ;0= ignore, 1= edit, 2= combo, 4= calendar, 256= use callback. Local $iaccsCounter Global $LVcolControl[$iaccsTotalColumns]; = [1,1,1,1];left click actions For $iaccsCounter = 0 to $iaccsTotalColumns-1 $LVcolControl[$iaccsCounter] = $iaccsLeftClickOption Next ;0 = ignore, 256= use context callback Global $LVcolRControl[$iaccsTotalColumns];= [256,256,256,256]; right click actions For $iaccsCounter = 0 to $iaccsTotalColumns-1 If $iaccsRightClickOption Then $LVcolRControl[$iaccsCounter] = 256 Else $LVcolRControl[$iaccsCounter] = 0 EndIf Next EndFunc ;==>_EIPInitAllColumnClicksStandard Further expand _InitEditLib() with a parameter to allow for an alternative function(s) to be used for the RegMsgs Example Func _InitEditLib($functionName="WM_Notify_Events_EditInPlaceStandard") $lvEdit = GUICtrlCreateInput("", 0, 0, 1, 1, BitOR($ES_AUTOHSCROLL, $ES_NOHIDESEL, $WS_BORDER), 0) GUICtrlSetState($lvEdit, $GUI_HIDE) GuiCtrlSetFont($lvEdit,8.5) $lvCombo = GUICtrlCreateCombo("", 0, 0, 1, 1) GUICtrlSetState($lvCombo, $GUI_HIDE) $lvDate = GUICtrlCreateDate("", 0, 0, 1, 1, $DTS_SHORTDATEFORMAT) GUICtrlSetState($lvDate, $GUI_HIDE) $lvCheckbox = GUICtrlCreateCheckbox('',0,0) GUICtrlSetState($lvCheckBox, $GUI_HIDE) GUIRegisterMsg($WM_NOTIFY, $functionName) EndFunc ;==>_InitEditLibI can add these to your udf, but I don't like messing with it for two reasons: one, you might foresee things that I can't/don't, and two, when I update I have to add those changes back (the first reason is more important).Let me know what you think of my "requests" andThanks! Edited September 14, 2007 by JohnBailey A decision is a powerful thing Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now