rasim Posted July 7, 2008 Posted July 7, 2008 (edited) Hi! This simple example showed, how to edit in place a ListView subitems.expandcollapse popup#include <GuiConstantsEx.au3> #include <GuiListView.au3> #include <GuiEdit.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> #include <WinAPI.au3> Opt("GuiCloseOnESC", 0) Global $hEdit, $Item = -1, $SubItem = 0 Global $Style = BitOR($WS_CHILD, $WS_VISIBLE, $WS_BORDER, $ES_AUTOHSCROLL, $ES_LEFT) $hGUI = GUICreate("ListView Subitems edit in place", 300, 200) $hListView = _GUICtrlListView_Create($hGUI, "Items|SubItems", 2, 2, 296, 196, BitOR($LVS_EDITLABELS, $LVS_REPORT)) _GUICtrlListView_SetExtendedListViewStyle($hListView, $LVS_EX_GRIDLINES) For $i = 1 To 10 _GUICtrlListView_AddItem($hListView, "Item " & $i) _GUICtrlListView_AddSubItem($hListView, $i - 1, "SubItem " & $i, 1) Next GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") GUIRegisterMsg($WM_COMMAND, "WM_COMMAND") GUISetState() Do Until GUIGetMsg() = $GUI_EVENT_CLOSE Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam) Local $tNMHDR, $hWndFrom, $iCode $tNMHDR = DllStructCreate($tagNMHDR, $ilParam) $hWndFrom = DllStructGetData($tNMHDR, "hWndFrom") $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $hListView Switch $iCode Case $NM_DBLCLK Local $aHit = _GUICtrlListView_SubItemHitTest($hListView) If ($aHit[0] <> -1) And ($aHit[1] > 0) Then $Item = $aHit[0] $SubItem = $aHit[1] Local $iSubItemText = _GUICtrlListView_GetItemText($hListView, $Item, $SubItem) Local $aRect = _GUICtrlListView_GetSubItemRect($hListView, $Item, $SubItem) $hEdit = _GUICtrlEdit_Create($hGUI, $iSubItemText, $aRect[0] + 1, $aRect[1] - 4, $aRect[2] - $aRect[0], 20, $Style) _WinAPI_SetFocus($hEdit) EndIf EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc Func WM_COMMAND($hWnd, $Msg, $wParam, $lParam) Local $iCode = BitShift($wParam, 16) Switch $lParam Case $hEdit Switch $iCode Case $EN_KILLFOCUS Local $iText = _GUICtrlEdit_GetText($hEdit) _GUICtrlListView_SetItemText($hListView, $Item, $iText, $SubItem) _WinAPI_DestroyWindow($hEdit) $Item = -1 $SubItem = 0 EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFuncmuttley Edited July 7, 2008 by rasim
smashly Posted July 7, 2008 Posted July 7, 2008 (edited) Hi, Nice work, I always wondered how to in place edit sub items muttley I added a little more to it to make it look uniform. expandcollapse popup#include <GuiEdit.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> #include <WinAPI.au3> Opt("GuiCloseOnESC", 0) Global $hEdit, $hDC, $hBrush, $Item = -1, $SubItem = 0 Global $Style = BitOR($WS_CHILD, $WS_VISIBLE, $ES_AUTOHSCROLL, $ES_LEFT) $hGUI = GUICreate("ListView Subitems edit in place", 300, 200) $hListView = _GUICtrlListView_Create($hGUI, "Items|SubItems", 2, 2, 296, 196, BitOR($LVS_EDITLABELS, $LVS_REPORT)) _GUICtrlListView_SetExtendedListViewStyle($hListView, $LVS_EX_GRIDLINES) For $i = 1 To 10 _GUICtrlListView_AddItem($hListView, "Item " & $i) _GUICtrlListView_AddSubItem($hListView, $i - 1, "SubItem " & $i, 1) Next GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") GUIRegisterMsg($WM_COMMAND, "WM_COMMAND") GUISetState() Do Until GUIGetMsg() = $GUI_EVENT_CLOSE Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam) Local $tNMHDR, $hWndFrom, $iCode $tNMHDR = DllStructCreate($tagNMHDR, $ilParam) $hWndFrom = DllStructGetData($tNMHDR, "hWndFrom") $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $hListView Switch $iCode Case $NM_DBLCLK Local $aHit = _GUICtrlListView_SubItemHitTest($hListView) If ($aHit[0] <> -1) And ($aHit[1] > 0) Then $Item = $aHit[0] $SubItem = $aHit[1] Local $iSubItemText = _GUICtrlListView_GetItemText($hListView, $Item, $SubItem) Local $iLen = _GUICtrlListView_GetStringWidth($hListView, $iSubItemText) Local $aRect = _GUICtrlListView_GetSubItemRect($hListView, $Item, $SubItem) $hEdit = _GUICtrlEdit_Create($hGUI, $iSubItemText, $aRect[0] + 6, $aRect[1], $iLen + 10, 17, $Style) _GUICtrlEdit_SetSel($hEdit, 0, -1) _WinAPI_SetFocus($hEdit) $hDC = _WinAPI_GetWindowDC($hEdit) $hBrush = _WinAPI_CreateSolidBrush(0) FrameRect($hDC, 0, 0, $iLen + 10 , 17, $hBrush) EndIf EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc Func FrameRect($hDC, $nLeft, $nTop, $nRight, $nBottom, $hBrush) Local $stRect = DllStructCreate("int;int;int;int") DllStructSetData($stRect, 1, $nLeft) DllStructSetData($stRect, 2, $nTop) DllStructSetData($stRect, 3, $nRight) DllStructSetData($stRect, 4, $nBottom) DllCall("user32.dll", "int", "FrameRect", "hwnd", $hDC, "ptr", DllStructGetPtr($stRect), "hwnd", $hBrush) EndFunc Func WM_COMMAND($hWnd, $Msg, $wParam, $lParam) Local $iCode = BitShift($wParam, 16) Switch $lParam Case $hEdit Switch $iCode Case $EN_KILLFOCUS Local $iText = _GUICtrlEdit_GetText($hEdit) _GUICtrlListView_SetItemText($hListView, $Item, $iText, $SubItem) _WinAPI_DeleteObject($hBrush) _WinAPI_ReleaseDC($hEdit, $hDC) _WinAPI_DestroyWindow($hEdit) $Item = -1 $SubItem = 0 EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc Cheers Edited July 7, 2008 by smashly
rasim Posted July 7, 2008 Author Posted July 7, 2008 smashlyThank you friend! Your little addition are improvement the code! Thanks again! muttley
BugFix Posted July 8, 2008 Posted July 8, 2008 Hi, here another way for this: expandcollapse popup#include<StaticConstants.au3> #include<GUIConstantsEx.au3> #include<ListViewConstants.au3> #include<StructureConstants.au3> #include<WindowsConstants.au3> #include <GUIListView.au3> Opt("GUIOnEventMode", 1) Global $currentItem[2], $title $gui = GUICreate('test') GUISetOnEvent($GUI_EVENT_CLOSE, '_ende') $hListView = GUICtrlCreateListView('Column1|Column2|Column3', 10, 10, 300, 200, $LVS_REPORT) _GUICtrlListView_SetColumnWidth($hListView, 0, 70) _GUICtrlListView_SetColumnWidth($hListView, 1, 60) _GUICtrlListView_SetColumnWidth($hListView, 2, $LVSCW_AUTOSIZE_USEHEADER ) For $i = 1 To 9 GUICtrlCreateListViewItem('R. ' & $i & ' - Col. 1|R. ' & $i & ' - Col. 2|R. ' & $i & ' - Col. 3', $hListView) Next $EditBox = GUICreate('', 200, 30, -1, -1, BitOR($WS_POPUP,$WS_BORDER), $WS_EX_TOPMOST) $edit = GUICtrlCreateInput('', 5, 5, 190, 20, $SS_CENTER) GUICtrlSetOnEvent(-1, '_EditEnter') HotKeySet('{ESC}', '_escEdit') GUISetState(@SW_SHOW, $gui) GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") While True Sleep(100) WEnd Func _LeftDblClick($Info) If $Info[3] = -1 Then Return _GUICtrlListView_SetSelectedColumn($Info[1], $Info[4]) $title = WinGetTitle($gui) Local $mouse = MouseGetPos(), $wndEdit = WinGetPos($EditBox) Local $wndGUI = WinGetPos($gui), $wndLV = ControlGetPos($gui, '', $hListView) Local $colInfo = _GUICtrlListView_GetColumn($Info[1], $Info[4]), $sumWidth = 0, $tmp WinSetTitle($gui, '', 'Edit: Row ' & $Info[3]+1 & ', ' & $colInfo[5]) For $i = 0 To $Info[4] $tmp = _GUICtrlListView_GetColumn($Info[1], $i) $sumWidth += $tmp[4] Next $sumWidth -= $colInfo[4] Local $xPos = $wndGUI[0]+$wndLV[0]+$sumWidth If $xPos+$colInfo[4]+10 > @DesktopWidth Then $xPos = @DesktopWidth - ($colInfo[4] + 10) If $xPos < 0 Then $xPos = 0 WinMove($EditBox, '', $xPos, $mouse[1]-$wndEdit[3], $colInfo[4]+10) GUICtrlSetData($edit, _GUICtrlListView_GetItemText($Info[1], $Info[3], $Info[4])) $currentItem[0] = $Info[3] $currentItem[1] = $Info[4] GUISetState(@SW_SHOW, $EditBox) EndFunc Func _escEdit() WinSetTitle($gui, '', $title) GUISetState(@SW_HIDE, $EditBox) EndFunc Func _EditEnter() WinSetTitle($gui, '', $title) _GUICtrlListView_SetItemText($hListView, $currentItem[0], GUICtrlRead($edit), $currentItem[1]) GUISetState(@SW_HIDE, $EditBox) EndFunc Func _ende() Exit EndFunc Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam) Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView $hWndListView = $hListView If Not IsHWnd($hListView) Then $hWndListView = GUICtrlGetHandle($hListView) $tNMHDR = DllStructCreate($tagNMHDR, $ilParam) $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) $iIDFrom = DllStructGetData($tNMHDR, "IDFrom") $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $hWndListView Switch $iCode Case $NM_DBLCLK ; Sent by a list-view control when the user double-clicks an item with the left mouse button Local $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam) Local $aInfo[5] = [$hWndFrom, $iIDFrom, $iCode, DllStructGetData($tInfo, "Index"), _ DllStructGetData($tInfo, "SubItem")] _LeftDblClick($aInfo) EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY Best Regards BugFix
DiscoEd Posted July 9, 2008 Posted July 9, 2008 rasim & BugFixThank you for the rapid response and the easy to understand examples. This will really help me out tremendously!Regards,DiscoEd
DiscoEd Posted July 15, 2008 Posted July 15, 2008 So, I found that rasim's and smashly's code worked very well for one listview control, and i started thinking about how to make it work with two listview controls. I know there is a alot of duplication in the WM_Notify function that follows, but it does seem to work with the two listview controls. The problem I'm having now is trying to figure out how to make the WM_Command function work with two controls. No matter what I've tried I can't seem to find the handle for the listview control that is being edited. Any ideas about how to make the WM_Command function work for both hListView and hListView2? Thank you, DiscoEd expandcollapse popup#include <GuiEdit.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> #include <WinAPI.au3> #include <GuiListView.au3>;Added by DiscoEd #include <GUIConstantsEx.au3>;Added by DiscoEd Opt("GuiCloseOnESC", 0) Global $hEdit, $hDC, $hBrush, $Item = -1, $SubItem = 0 Global $Style = BitOR($WS_CHILD, $WS_VISIBLE, $ES_AUTOHSCROLL, $ES_LEFT) $hGUI = GUICreate("ListView Subitems edit in place", 300, 500) $hListView = _GUICtrlListView_Create ($hGUI, "Items|SubItems|SubItems2", 2, 2, 296, 196, BitOR($LVS_EDITLABELS, $LVS_REPORT)) _GUICtrlListView_SetExtendedListViewStyle ($hListView, $LVS_EX_GRIDLINES) $hListView2 = _GUICtrlListView_Create ($hGUI, "Items|SubItems|SubItems2", 2, 210, 296, 196, BitOR($LVS_EDITLABELS, $LVS_REPORT)) _GUICtrlListView_SetExtendedListViewStyle ($hListView2, $LVS_EX_GRIDLINES) For $i = 1 To 10 _GUICtrlListView_AddItem ($hListView, "Item " & $i) _GUICtrlListView_AddSubItem ($hListView, $i - 1, "SubItem " & $i, 1) _GUICtrlListView_AddSubItem ($hListView, $i - 1, "SubItem " & $i, 2) _GUICtrlListView_AddItem ($hListView2, "Item " & $i) _GUICtrlListView_AddSubItem ($hListView2, $i - 1, "SubItem " & $i, 1) _GUICtrlListView_AddSubItem ($hListView2, $i - 1, "SubItem " & $i, 2) Next GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") GUIRegisterMsg($WM_COMMAND, "WM_COMMAND") GUISetState() Do Until GUIGetMsg() = $GUI_EVENT_CLOSE Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam) Local $tNMHDR, $hWndFrom, $iCode $tNMHDR = DllStructCreate($tagNMHDR, $ilParam) $hWndFrom = DllStructGetData($tNMHDR, "hWndFrom") $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $hListView Switch $iCode Case $NM_DBLCLK Local $aHit = _GUICtrlListView_SubItemHitTest ($hListView) If ($aHit[0] <> -1) And ($aHit[1] > 0) Then $Item = $aHit[0] $SubItem = $aHit[1] Local $iSubItemText = _GUICtrlListView_GetItemText ($hListView, $Item, $SubItem) Local $iLen = _GUICtrlListView_GetStringWidth ($hListView, $iSubItemText) Local $aRect = _GUICtrlListView_GetSubItemRect ($hListView, $Item, $SubItem) $hEdit = _GUICtrlEdit_Create ($hGUI, $iSubItemText, $aRect[0] + 6, $aRect[1], $iLen + 10, 17, $Style) _GUICtrlEdit_SetSel ($hEdit, 0, -1) _WinAPI_SetFocus ($hEdit) $hDC = _WinAPI_GetWindowDC ($hEdit) $hBrush = _WinAPI_CreateSolidBrush (0) FrameRect($hDC, 0, 0, $iLen + 10, 17, $hBrush) EndIf EndSwitch Case $hListView2 Switch $iCode Case $NM_DBLCLK Local $aHit = _GUICtrlListView_SubItemHitTest ($hListView2) If ($aHit[0] <> -1) And ($aHit[1] > 0) Then $Item = $aHit[0] $SubItem = $aHit[1] Local $iSubItemText = _GUICtrlListView_GetItemText ($hListView2, $Item, $SubItem) Local $iLen = _GUICtrlListView_GetStringWidth ($hListView2, $iSubItemText) Local $aRect = _GUICtrlListView_GetSubItemRect ($hListView2, $Item, $SubItem) $hEdit = _GUICtrlEdit_Create ($hGUI, $iSubItemText, $aRect[0] + 6, $aRect[1], $iLen + 10, 17, $Style) _GUICtrlEdit_SetSel ($hEdit, 0, -1) _WinAPI_SetFocus ($hEdit) $hDC = _WinAPI_GetWindowDC ($hEdit) $hBrush = _WinAPI_CreateSolidBrush (0) FrameRect($hDC, 0, 0, $iLen + 10, 17, $hBrush) EndIf EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY Func FrameRect($hDC, $nLeft, $nTop, $nRight, $nBottom, $hBrush) Local $stRect = DllStructCreate("int;int;int;int") DllStructSetData($stRect, 1, $nLeft) DllStructSetData($stRect, 2, $nTop) DllStructSetData($stRect, 3, $nRight) DllStructSetData($stRect, 4, $nBottom) DllCall("user32.dll", "int", "FrameRect", "hwnd", $hDC, "ptr", DllStructGetPtr($stRect), "hwnd", $hBrush) EndFunc ;==>FrameRect Func WM_COMMAND($hWnd, $Msg, $wParam, $lParam) Local $iCode = BitShift($wParam, 16) ;<<<<< ---- CAN I GET THE LISTVIEW CONTROL HANDLE FROM THE WM_COMMAND PARAMETERS AND USE IT IN A SWITCH HERE? Switch $lParam Case $hEdit Switch $iCode Case $EN_KILLFOCUS Local $iText = _GUICtrlEdit_GetText ($hEdit) _GUICtrlListView_SetItemText ($hListView, $Item, $iText, $SubItem) _WinAPI_DeleteObject ($hBrush) _WinAPI_ReleaseDC ($hEdit, $hDC) _WinAPI_DestroyWindow ($hEdit) $Item = -1 $SubItem = 0 EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_COMMAND
Creator Posted July 15, 2008 Posted July 15, 2008 /me ran off to adjust some off my earlier GUI's with sublistitems that needed to be editable. Very naischhh! muttley
rasim Posted July 16, 2008 Author Posted July 16, 2008 DiscoEdHi! Please don`t forget, this is not a general support forum! Create topic with your questions in Graphical User Interface (GUI) Help and Support muttley
M4n0x Posted June 25, 2013 Posted June 25, 2013 (edited) Hi, Thanks it's just what i'm looking for !! I added some details in it : - Press "Enter" to close the editbox - Editbox follow the listview when you change its position. expandcollapse popup#include <GuiConstants.au3> #include <GuiEdit.au3> #include <GuiListView.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> #include <WinAPI.au3> Opt("GuiCloseOnESC", 0) Global $hEdit, $hDC, $hBrush, $Item = -1, $SubItem = 0 Global $Style = BitOR($WS_CHILD, $WS_VISIBLE, $ES_AUTOHSCROLL, $ES_LEFT) $hGUI = GUICreate("ListView Subitems edit in place", 370, 280) $hNM_DBCLK = GUICtrlCreateDummy() $hEN_KILLFOCUS = GUICtrlCreateDummy() $hListView = _GUICtrlListView_Create($hGUI, "test1|test2", 32, 35, 300, 214) _GUICtrlListView_SetExtendedListViewStyle($hListView, BitOR($LVS_AUTOARRANGE,$LVS_EX_FULLROWSELECT,$LVS_EX_DOUBLEBUFFER,$LVS_EX_SUBITEMIMAGES)) For $i = 1 To 10 _GUICtrlListView_AddItem($hListView, "Item " & $i) _GUICtrlListView_AddSubItem($hListView, $i - 1, "SubItem " & $i, 1) Next GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") GUIRegisterMsg($WM_COMMAND, "WM_COMMAND") GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit case $hNM_DBCLK Start_EditingLV() Case $hEN_KILLFOCUS End_EditingLV() EndSwitch WEnd Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam) Local $tNMHDR, $hWndFrom, $iCode $tNMHDR = DllStructCreate($tagNMHDR, $ilParam) $hWndFrom = DllStructGetData($tNMHDR, "hWndFrom") $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $hListView Switch $iCode Case $NM_DBLCLK GUICtrlSendToDummy($hNM_DBCLK) EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc Func FrameRect($hDC, $nLeft, $nTop, $nRight, $nBottom, $hBrush) Local $stRect = DllStructCreate("int;int;int;int") DllStructSetData($stRect, 1, $nLeft) DllStructSetData($stRect, 2, $nTop) DllStructSetData($stRect, 3, $nRight) DllStructSetData($stRect, 4, $nBottom) DllCall("user32.dll", "int", "FrameRect", "hwnd", $hDC, "ptr", DllStructGetPtr($stRect), "hwnd", $hBrush) EndFunc Func WM_COMMAND($hWnd, $Msg, $wParam, $lParam) Local $iCode = BitShift($wParam, 16) Switch $lParam Case $hEdit Switch $iCode Case $EN_KILLFOCUS GUICtrlSendToDummy($hEN_KILLFOCUS) EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc Func Start_EditingLV() ControlDisable($hGUI, "", HWnd(_GUICtrlListView_GetHeader($hListView))) Local $aHit = _GUICtrlListView_SubItemHitTest($hListView) Local $hRect = ControlGetPos($hGUI, "", $hListView) If ($aHit[0] <> -1) And ($aHit[1] = 0) Then $Item = $aHit[0] $SubItem = 0 Local $aRect = _GUICtrlListView_GetItemRect($hListView, $Item) ElseIf ($aHit[0] <> -1) And ($aHit[1] > 0) Then $Item = $aHit[0] $SubItem = $aHit[1] Local $aRect = _GUICtrlListView_GetSubItemRect($hListView, $Item, $SubItem) Else Return $GUI_RUNDEFMSG EndIf Local $iItemText = _GUICtrlListView_GetItemText($hListView, $Item, $SubItem) Local $iLen = _GUICtrlListView_GetStringWidth($hListView, $iItemText) $hEdit = _GUICtrlEdit_Create($hGUI, $iItemText, $aRect[0] + ($hRect[0] + 3), $aRect[1] + $hRect[1], $iLen + 10, 17, $Style) _GUICtrlEdit_SetSel($hEdit, 0, -1) _WinAPI_SetFocus($hEdit) $hDC = _WinAPI_GetWindowDC($hEdit) $hBrush = _WinAPI_CreateSolidBrush(0x0000FF) FrameRect($hDC, 0,0, $iLen + 10 , 17, $hBrush) HotKeySet("{ENTER}", "End_EditingLV") EndFunc Func End_EditingLV() Local $iText = _GUICtrlEdit_GetText($hEdit) _GUICtrlListView_SetItemText($hListView, $Item, $iText, $SubItem) _WinAPI_DeleteObject($hBrush) _WinAPI_ReleaseDC($hEdit, $hDC) _WinAPI_DestroyWindow($hEdit) ControlEnable($hGUI, "", HWnd(_GUICtrlListView_GetHeader($hListView))) $Item = -1 $SubItem = 0 HotKeySet("{ENTER}") EndFunc I know this post is old but maybe this can help anyone. Edited June 26, 2013 by M4n0x Numan 1
sulfurious Posted June 28, 2013 Posted June 28, 2013 @M4n0x Nice little bit there. I was looking for such a feature yesterday and your posting brought this to my attention. Thanks. One thing, I like they way your method keeps the input box as a "cell" rather than a popup type overlay. And I like how the enter button commits the edits. However, I cannot seem to figure out how to convert it to use OnEvent. Things get wonky with the hotkey and enter, but works fine without that. Actually if you just convert it all to OnEvent, the end_editLV runs twice and the second time through clears the value out. Any ideas?
M4n0x Posted July 1, 2013 Posted July 1, 2013 @Sulfurious, What you mean by OnEvent ? Which event ? What end_editLV does the first time ? Maybe an example will clarify what you want to do.
faustf Posted September 4, 2014 Posted September 4, 2014 hi guy i have questions , but is possible write tex in listview without item example : i have a list empty and want write item , how can is possible do ??? thankzz
Moderators Melba23 Posted September 4, 2014 Moderators Posted September 4, 2014 faustf,As far as I know you need to add an empty item to a ListView before you can edit it - no item means no edit. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
qwert Posted September 9, 2014 Posted September 9, 2014 I've been exploring ListViews for the first time and just noticed these excellent examples. Is there any possibility of dragging text from one "cell" to an empty one?
Moderators Melba23 Posted September 9, 2014 Moderators Posted September 9, 2014 qwert,My GUIListViewEx UDF allows you to drag entire rows within and between ListViews - perhaps the code might offer some ideas on how you might drag single sub-items. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
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