satanico64 2 Posted April 5, 2017 Share Posted April 5, 2017 Hi guys, 2 Question for the boss: Is it possible to make a different context menu for each row ? Or is the solution to create it, at each right click, for each row index ? Same question for a column configured with a combo (by _GUIListViewEx_SetEditStatus). Is there a way to do this for each row or may i intercept doublclick and modify my combo data) thanks for the advice/method. Nicolas. Link to post Share on other sites
Moderators Melba23 3,726 Posted April 5, 2017 Author Moderators Share Posted April 5, 2017 satanico64, I have no idea about the context menus - each row of a ListView is a separate control so you should be able to do it but nothing in this UDF can help you do it. The combo content is set forĀ a specificĀ column when defining the edit mode - there is no easy way I can see to allow for different contents for different rows. And given that the usual function of a ListView is to tabulate similar elements in eachĀ columnĀ I wonder why you even see the need for such a functionality? 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 Ā Link to post Share on other sites
satanico64 2 Posted April 5, 2017 Share Posted April 5, 2017 thanks for your answer,Ā so i'm going to dismember again your code to make this. Ā my list manage materials from stock, from clients to stock and stock to clients, and materials remplacement. My combo indicate 'from client to stock' and "from stock to client" ( i'm simplifying) It's populate from materials which is at the client site. I juste want to be impossible to select 'from stock to client' on an item which is at the client site. something like that. it make sense believe me (not sure i'm really clear) thanks for your quickĀ answer. Nicolas. Link to post Share on other sites
Moderators Melba23 3,726 Posted April 5, 2017 Author Moderators Share Posted April 5, 2017 satanico64, Quote I juste want to be impossible to select 'from stock to client' on an item which is at the client site I would suggest using the array returned by the _EventMonitor function after a successfulĀ edit to check if the selection was valid for that particular rowĀ - and if not use the _GUIListViewEx_ChangeItem function to reset the original value (also foundĀ in the returned array) and pop up a MsgBox to warn the user. That is why I added the ability to check the edited values to the UDF. Let me know if a quick example would help understand how to do it. 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 Ā Link to post Share on other sites
satanico64 2 Posted April 5, 2017 Share Posted April 5, 2017 i understand what you mean. I thought it was better to block the possibility before, than check it just after. So it certainly will be easier in your way. Let's ask my lazy-meter.....Ā ok i'll do your way... Ā i'll try by myself before asking your example, thanks Melba More than 27k posts ? are you a bot man ?Ā Ā Have you passed the turing test ? Ā Tankbuster 1 Link to post Share on other sites
rootx 18 Posted May 11, 2017 Share Posted May 11, 2017 (edited) Hello melba and guys, Someone can help me understand how to do it: 1. I want to know how to order the icon column correctly,I just ordered the columns with the text but the column with the icons do not coincide correctly. 2. How can I use this function to launch sorting when I click on the listview header My code here, and filesĀ https://ufile.io/03x69 THX Ā expandcollapse popup#include <ButtonConstants.au3> #include <ListViewConstants.au3> #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <GuiListView.au3> #include <GDIPlus.au3> #include <Array.au3> #include <GuiImageList.au3> #include <StaticConstants.au3> #include <IE.au3> #include <Misc.au3> #include <EditConstants.au3> #include <ListBoxConstants.au3> #include <GuiListBox.au3> #include <File.au3> #include <FileConstants.au3> #include <WinAPI.au3> #include <WinAPITheme.au3> #include <Color.au3> #include <ColorConstants.au3> #include <WinAPIConstants.au3> #include "GUIListViewEx.au3" #Region ### START Koda GUI section ### Form= Global $IEControl,$tini = @ScriptDir&"\test.ini" Global $ListView $Form1 = GUICreate("Form1", 800, 600, 192, 124) $ListView = GUICtrlCreateListView("", 10, 10, 780, 580, -1, BitOR($LVS_EX_FULLROWSELECT, 0x00010000)) _GUICtrlListView_SetExtendedListViewStyle($ListView, BitOR($LVS_AUTOARRANGE, $LVS_EX_FULLROWSELECT, $LVS_EX_DOUBLEBUFFER, $LVS_EX_SUBITEMIMAGES)) GUICtrlSetFont($ListView, 8, Default, Default, "Arial") GUICtrlSetResizing($ListView,1); 102 + 2) _GUICtrlListView_AddColumn($ListView, "Icon", 70) _GUICtrlListView_AddColumn($ListView, "Name", 330) _GUICtrlListView_AddColumn($ListView, "Country", 50) _GUICtrlListView_AddColumn($ListView, "Path", 320) _GUIListViewEx_MsgRegister() read() GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $ListView EndSwitch WEnd GUIDelete() Func read() Local $tot = 0 If FileExists($tini) Then $hImage2 = _GUIImageList_Create(48, 48, 5, 1) _GDIPlus_Startup() $aArrays = IniReadSectionNames($tini) If Not @error Then For $i = 1 To UBound($aArrays) - 1 $n = IniRead($tini, $aArrays[$i], "name", "") $z = IniRead($tini, $aArrays[$i], "ico", "") $r = IniRead($tini, $aArrays[$i], "region", "") ConsoleWrite($z&@CRLF) ;load icon and upscale the icon to 48x48 pixels $hBitmap2 = _GDIPlus_BitmapCreateFromFile($z) $hBitmap_scaled2 = _GDIPlus_ImageResize($hBitmap2, 48, 48) $hBitmap_GDI = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap_scaled2) _GDIPlus_BitmapDispose($hBitmap_scaled2) $ico = _GUIImageList_Add($hImage2, $hBitmap_GDI) _GUICtrlListView_SetImageList($ListView, $hImage2, 1) _GUICtrlListView_AddItem($ListView, "", $ico) _GUICtrlListView_AddSubItem($ListView, $i - 1, $n, 1) _GUICtrlListView_AddSubItem($ListView, $i - 1, $r, 2) _GUICtrlListView_AddSubItem($ListView, $i - 1, $aArrays[$i], 3) $tot += 1 Next $aLVArray = _GUIListViewEx_ReadToArray($ListView) $iLV_Index = _GUIListViewEx_Init($ListView, $aLVArray, 0, 0, True, 0) $sort = _GUIListViewEx_SortCol($iLV_Index,1);<------------------------- ConsoleWrite("Satus " & $sort&@CRLF);<------------------------- _GDIPlus_Shutdown() EndIf EndIf EndFunc ;==>read ; ======================================================== ; This thing is responcible for click events ; ======================================================== Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam) Local $hWndFrom, $iCode, $tNMHDR, $hWndListView $hWndListView = $ListView If Not IsHWnd($ListView) Then $hWndListView = GUICtrlGetHandle($ListView) $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_CLICK Local $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam) $Index = DllStructGetData($tInfo, "Index") If DllStructGetData($tInfo, "Index") = -1 Then ConsoleWrite("no item" & @CRLF) Else Local $iItemTextCL = _GUICtrlListView_GetItemText($ListView, DllStructGetData($tInfo, "Index"), 1) ConsoleWrite("Click item "&$iItemTextCL&@CRLF) EndIf Case $LVN_KEYDOWN $tInfo = DllStructCreate($tagNMLVKEYDOWN, $ilParam) $iKey = DllStructGetData($tInfo, "VKey") ; Get current selection $aLastSel = StringSplit(_GUIListViewEx_GetLastSelectedItem(), "|") Switch $iKey Case 38 If _GUIListViewEx_GetLastSelectedItem() <> "" Then ; Move up unless at top $iCurrItem = $aLastSel[2] - 1 If $iCurrItem < 0 Then $iCurrItem = 0 EndIf _GUICtrlListView_ClickItem($hWndFrom, $iCurrItem, "top", False, 1, 2) $target = _GUICtrlListView_GetItemText($ListView, $iCurrItem, 1) ConsoleWrite("up item " & $target & @CRLF) Else _GUICtrlListView_ClickItem($hWndFrom, 0, "top", False, 1, 2) EndIf Case 40 If _GUIListViewEx_GetLastSelectedItem() <> "" Then ; Move down unless at bottom $iCurrItem = $aLastSel[2] + 1 If $iCurrItem >= _GUICtrlListView_GetItemCount($hWndFrom) Then $iCurrItem = _GUICtrlListView_GetItemCount($hWndFrom) - 1 EndIf _GUICtrlListView_ClickItem($hWndFrom, $iCurrItem, "down", False, 1, 2) $targetb = _GUICtrlListView_GetItemText($ListView, $iCurrItem, 1) ConsoleWrite("down item " & $targetb & @CRLF) Else _GUICtrlListView_ClickItem($hWndFrom, 0, "down", False, 1, 2) EndIf EndSwitch Case $NM_DBLCLK Local $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam) $Index = DllStructGetData($tInfo, "Index") If DllStructGetData($tInfo, "Index") = -1 Then ConsoleWrite("no item" & @CRLF) Else Local $iItemText = _GUICtrlListView_GetItemText($ListView, DllStructGetData($tInfo, "Index"), 1) ConsoleWrite("Dbclick item " & $iItemText & @CRLF) EndIf Case $NM_RCLICK Local $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam) $Index = DllStructGetData($tInfo, "Index") If DllStructGetData($tInfo, "Index") = -1 Then ConsoleWrite("no item" & @CRLF) Else Local $iItemTextr = _GUICtrlListView_GetItemText($ListView, DllStructGetData($tInfo, "Index"), 1) ConsoleWrite("Nmclick item " & $iItemTextr & @CRLF) EndIf EndSwitch EndSwitch $iRet = _GUIListViewEx_WM_NOTIFY_Handler($hWnd, $iMsg, $iwParam, $ilParam) Return $iRet Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY Func _GUIListViewEx_GetLastSelectedItem($iLV_Index = 0) ; Check valid index Switch $iLV_Index Case 1 To $aGLVEx_Data[0][0] EndSwitch ; Read last selected item Local $iRow = $aGLVEx_Data[$iLV_Index][20] Local $iCol = $aGLVEx_Data[$iLV_Index][21] ; Check selection has been made If $iRow = -1 Or $iCol = -1 Then Return SetError(2, 0, "") ; Return selection details Return $iLV_Index & "|" & $iRow & "|" & $iCol EndFunc ;==>_GUIListViewEx_GetLastSelectedItem Ā Edited May 12, 2017 by rootx Link to post Share on other sites
Moderators Melba23 3,726 Posted May 11, 2017 Author Moderators Share Posted May 11, 2017 rootx, As I have explained many times, the UDF does not support sorting ListViews with icons as it only uses the SimpleSort function. The code is already complicated enough, so I have no intention of trying to add this functionality either - sorry. 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 Ā Link to post Share on other sites
rootx 18 Posted May 11, 2017 Share Posted May 11, 2017 Sorry, I did not read that topic, I would like to know if you believe I can use GUICtrlListView Register Sort CallBack ($ ListView), or this conflicts with your UDF. THX Link to post Share on other sites
Moderators Melba23 3,726 Posted May 11, 2017 Author Moderators Share Posted May 11, 2017 rootx, I have never tried, so why not do so yourself. Just make sure you do not set the UDF to sort columns as well. 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 Ā Link to post Share on other sites
mLipok 1,319 Posted June 4, 2017 Share Posted June 4, 2017 (edited) I think I found issue inĀ GLVEx_Example_1.au3 Step to reproduce: Run Click and hold on "Tom 6" Drag "Tom 6" to line beetwen "Tom 0" and "Tom 1" Symptoms: in many cases / tryies , "Tom 6" is moved beetwen Ā "Tom 1" and "Tom 2" Regards, mLipok Ā Ā Edited June 4, 2017 by mLipok Signature beginning:*Ā Please remember: "AutoIt".....Ā *Ā Ā Wondering who uses AutoIt and what it can be used for ?Ā *Ā Forum RulesĀ **Ā ADO.au3 UDFĀ *Ā POP3.au3 UDFĀ *Ā XML.au3 UDFĀ *Ā IE on Windows 11 *Ā for other useful stuffĀ click the following button: Spoiler AnyĀ of myĀ own codeĀ posted anywhere on the forumĀ isĀ available for use by others without any restrictionĀ of any kind.Ā My contribution (my own projects):Ā *Ā Debenu Quick PDF Library - UDFĀ *Ā Debenu PDF Viewer SDK - UDFĀ *Ā Acrobat Reader - ActiveX ViewerĀ * UDF for PDFCreator v1.x.xĀ *Ā XZip - UDFĀ *Ā AppCompatFlagsĀ UDFĀ *Ā CrowdinAPIĀ UDFĀ *Ā _WinMergeCompare2Files()Ā *Ā _JavaExceptionAdd()Ā *Ā _IsBeta()Ā *Ā Writing DPI Awareness App - workaroundĀ *Ā _AutoIt_RequiredVersion()Ā * Chilkatsoft.au3 UDFĀ *Ā TeamViewer.au3 UDFĀ *Ā JavaManagement UDFĀ *Ā VIES over SOAPĀ * WinSCP UDFĀ * GHAPI UDF - modest begining - comunication with GitHub REST API *Ā ErrorLog.au3 UDF - A logging LibraryĀ *Ā Include Dependency Tree (Tool for analyzing script relations)Ā * My contribution to others projects or UDF based on Ā others projects:Ā *Ā _sql.au3 UDFĀ Ā * POP3.au3 UDFĀ * Ā RTF Printer - UDFĀ * XML.au3 UDFĀ * ADO.au3 UDF *Ā SMTP Mailer UDFĀ *Ā Dual Monitor resolution detection * *Ā 2GUI on Dual Monitor System * _SciLexer.au3 UDFĀ *Ā SciTE - Lexer for console pane *Ā Useful links:Ā * Forum RulesĀ *Ā Forum etiquetteĀ *Ā Forum Information and FAQsĀ *Ā How to post code on the forumĀ *Ā AutoIt Online DocumentationĀ *Ā AutoIt Online Beta DocumentationĀ *Ā SciTE4AutoIt3 getting startedĀ *Ā Convert text blocks to AutoIt codeĀ *Ā Games made in AutoitĀ *Ā Programming related sitesĀ *Ā Polish AutoIt TutorialĀ *Ā DllCall Code GeneratorĀ *Ā Wiki:Ā *Ā Expand your knowledge - AutoIt WikiĀ *Ā Collection of User Defined FunctionsĀ *Ā How to use HelpFileĀ *Ā Good coding practices in AutoItĀ *Ā OpenOffice/LibreOffice/XLS Related:Ā WriterDemo.au3Ā *Ā XLS/MDB from scratch with ADOX IE Related:Ā Ā *Ā How to use IE.au3 Ā UDF with Ā AutoIt v3.3.14.xĀ *Ā Why isn't Autoit able to click a Javascript Dialog?Ā *Ā Clicking javascript button with no IDĀ *Ā IE document >> save as MHT fileĀ * IETab Switcher (by LarsJ )Ā *Ā HTML Entities * _IEquerySelectorAll() (by uncommon)Ā *Ā IE in TaskScheduler *Ā IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI)Ā *Ā PDFĀ Related: *Ā How to get reference to PDF object embeded in IE * IE on Windows 11 *Ā I encourage you to read:Ā * Global VarsĀ * Best Coding PracticesĀ *Ā Please explain code used in Help file for several File functionsĀ *Ā OOP-like approach in AutoItĀ * UDF-Spec QuestionsĀ *Ā EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMDĀ *I also encourage you to check awesome @trancexxĀ code:Ā *Ā Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff *Ā OnHungApp handler *Ā Avoid "AutoIt Error" message box in unknown errorsĀ Ā *Ā HTML editor *Ā winhttp.au3 related :Ā *Ā https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"Ā Ā , beĀ Ā Ā and Ā Ā Ā \\//_. Anticipating ErrorsĀ :Ā Ā "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2022-03-07 Link to post Share on other sites
Moderators Melba23 3,726 Posted June 5, 2017 Author Moderators Share Posted June 5, 2017 mLipok, I have just tried multiple drag/drop steps as you describe and I get the row moved to the correct location each time. Are you waiting for the delimiter bar toĀ appear in the requiredĀ placeĀ before releasing the mouse button? I wonder if you are not releasing too soon. 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 Ā Link to post Share on other sites
Gambler71 0 Posted June 7, 2017 Share Posted June 7, 2017 Is it possible to stop the default windows ding sound when dragging an item? Ā I am right in saying there is no way to stop a script from having sound? e.g. #NoSoundPlease Link to post Share on other sites
Moderators Melba23 3,726 Posted June 7, 2017 Author Moderators Share Posted June 7, 2017 Gambler71, I believe that you will need to turn off the associated Windows sound effect - there is nothing that I know of which allows a script to do so independently. 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 Ā Link to post Share on other sites
mLipok 1,319 Posted June 7, 2017 Share Posted June 7, 2017 On 5.06.2017 at 8:52 AM, Melba23 said: I have just tried multiple drag/drop steps as you describe and I get the row moved to the correct location each time. Are you waiting for the delimiter bar toĀ appear in the requiredĀ placeĀ before releasing the mouse button? I wonder if you are not releasing too soon. I need to look more closely at this. Signature beginning:*Ā Please remember: "AutoIt".....Ā *Ā Ā Wondering who uses AutoIt and what it can be used for ?Ā *Ā Forum RulesĀ **Ā ADO.au3 UDFĀ *Ā POP3.au3 UDFĀ *Ā XML.au3 UDFĀ *Ā IE on Windows 11 *Ā for other useful stuffĀ click the following button: Spoiler AnyĀ of myĀ own codeĀ posted anywhere on the forumĀ isĀ available for use by others without any restrictionĀ of any kind.Ā My contribution (my own projects):Ā *Ā Debenu Quick PDF Library - UDFĀ *Ā Debenu PDF Viewer SDK - UDFĀ *Ā Acrobat Reader - ActiveX ViewerĀ * UDF for PDFCreator v1.x.xĀ *Ā XZip - UDFĀ *Ā AppCompatFlagsĀ UDFĀ *Ā CrowdinAPIĀ UDFĀ *Ā _WinMergeCompare2Files()Ā *Ā _JavaExceptionAdd()Ā *Ā _IsBeta()Ā *Ā Writing DPI Awareness App - workaroundĀ *Ā _AutoIt_RequiredVersion()Ā * Chilkatsoft.au3 UDFĀ *Ā TeamViewer.au3 UDFĀ *Ā JavaManagement UDFĀ *Ā VIES over SOAPĀ * WinSCP UDFĀ * GHAPI UDF - modest begining - comunication with GitHub REST API *Ā ErrorLog.au3 UDF - A logging LibraryĀ *Ā Include Dependency Tree (Tool for analyzing script relations)Ā * My contribution to others projects or UDF based on Ā others projects:Ā *Ā _sql.au3 UDFĀ Ā * POP3.au3 UDFĀ * Ā RTF Printer - UDFĀ * XML.au3 UDFĀ * ADO.au3 UDF *Ā SMTP Mailer UDFĀ *Ā Dual Monitor resolution detection * *Ā 2GUI on Dual Monitor System * _SciLexer.au3 UDFĀ *Ā SciTE - Lexer for console pane *Ā Useful links:Ā * Forum RulesĀ *Ā Forum etiquetteĀ *Ā Forum Information and FAQsĀ *Ā How to post code on the forumĀ *Ā AutoIt Online DocumentationĀ *Ā AutoIt Online Beta DocumentationĀ *Ā SciTE4AutoIt3 getting startedĀ *Ā Convert text blocks to AutoIt codeĀ *Ā Games made in AutoitĀ *Ā Programming related sitesĀ *Ā Polish AutoIt TutorialĀ *Ā DllCall Code GeneratorĀ *Ā Wiki:Ā *Ā Expand your knowledge - AutoIt WikiĀ *Ā Collection of User Defined FunctionsĀ *Ā How to use HelpFileĀ *Ā Good coding practices in AutoItĀ *Ā OpenOffice/LibreOffice/XLS Related:Ā WriterDemo.au3Ā *Ā XLS/MDB from scratch with ADOX IE Related:Ā Ā *Ā How to use IE.au3 Ā UDF with Ā AutoIt v3.3.14.xĀ *Ā Why isn't Autoit able to click a Javascript Dialog?Ā *Ā Clicking javascript button with no IDĀ *Ā IE document >> save as MHT fileĀ * IETab Switcher (by LarsJ )Ā *Ā HTML Entities * _IEquerySelectorAll() (by uncommon)Ā *Ā IE in TaskScheduler *Ā IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI)Ā *Ā PDFĀ Related: *Ā How to get reference to PDF object embeded in IE * IE on Windows 11 *Ā I encourage you to read:Ā * Global VarsĀ * Best Coding PracticesĀ *Ā Please explain code used in Help file for several File functionsĀ *Ā OOP-like approach in AutoItĀ * UDF-Spec QuestionsĀ *Ā EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMDĀ *I also encourage you to check awesome @trancexxĀ code:Ā *Ā Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff *Ā OnHungApp handler *Ā Avoid "AutoIt Error" message box in unknown errorsĀ Ā *Ā HTML editor *Ā winhttp.au3 related :Ā *Ā https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"Ā Ā , beĀ Ā Ā and Ā Ā Ā \\//_. Anticipating ErrorsĀ :Ā Ā "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2022-03-07 Link to post Share on other sites
supersonic 5 Posted June 22, 2017 Share Posted June 22, 2017 Melba23, very nice UDF! I get an error if "MustDeclareVars" is placed before "#include GUIListViewEx.au3": "D:\SUPERSONIC\_\AUTOIT\Include\Melba23\GUIListViewEx\20170216\_\GUIListViewEx.au3" (3753) : ==> Variable used without being declared.: $iCol = DllStructGetData($tNMHEADER, "Item") ^ ERROR Link to post Share on other sites
Moderators Melba23 3,726 Posted June 22, 2017 Author Moderators Share Posted June 22, 2017 (edited) supersonic, I do not get that error with my master copy of the UDFĀ - are you sure you have the latest version? M23 Edit: Apologies, I can see where it might occur during execution but not be picked up by Au3Check - I will see how I can fix it. Edited June 22, 2017 by Melba23 Ā 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 Ā Link to post Share on other sites
JanZoudlik 2 Posted July 6, 2017 Share Posted July 6, 2017 Hi Melba, great work on this as always... I use old version of this UDF but I guess I will have to upgrade as I need some features from your new version. To be more exact I need one column to have updown control. And I struggle to figure out how to SetEditStatus so it has UpDown controls next to number and further to that how can I limit range(for example so it goes from 1 to 6). Any help would be appreciated... Thanks a lot Jan Link to post Share on other sites
Moderators Melba23 3,726 Posted July 6, 2017 Author Moderators Share Posted July 6, 2017 JanZoudlik, The _SetEditStatus function header explains how to get an UpDown control and how to set limitsĀ and even whether the controlĀ should wrap - but in trying to write you a shortĀ example I have just discovered that another later change to the UDF has broken that particular section!Ā So give me a moment to work out how to fix it and I will come back. 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 Ā Link to post Share on other sites
Moderators Melba23 3,726 Posted July 6, 2017 Author Moderators Share Posted July 6, 2017 JanZoudlik, There is no problem with the UDFĀ - I had mis-read my own instructions on how to do it!!!!! I really do feel that this UDF is now far too complicated for its own good, but people seem to like it..... Here is an UpDown example which works with the latest version: expandcollapse popup#include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include "GUIListViewEx.au3" $hGUI = GUICreate("ListView UpDown Test", 500, 500) $cLV = GUICtrlCreateListView("No UpDown|UpDown|Limit UpDown|Wrap UpDown", 10, 10, 420, 260, BitOR($LVS_SINGLESEL, $LVS_SHOWSELALWAYS)) _GUICtrlListView_SetExtendedListViewStyle($cLV, $LVS_EX_FULLROWSELECT) For $i = 0 To 3 _GUICtrlListView_SetColumnWidth($cLV, $i, 100) Next ; Create array and fill listview Global $aLVArray[6][4] For $i = 0 To 5 $sData = "Item " & $i & "-0" $aLVArray[$i][0] = $sData For $j = 1 To 3 $sData &= "|SubItem " & $i & "-" & $j $aLVArray[$i][$j] = "SubItem " & $i & "-" & $j Next GUICtrlCreateListViewItem($sData, $cLV) Next ; Initiate ListView $iLVIndex = _GUIListViewEx_Init($cLV, $aLVArray) ; Set column edit status _GUIListViewEx_SetEditStatus($iLVIndex, 0, 1) ; Default = standard text edit _GUIListViewEx_SetEditStatus($iLVIndex, 1, 1, 1) ; UpDown with no limit _GUIListViewEx_SetEditStatus($iLVIndex, 2, 1, 1, "1|6|0") ; UpDown with limit _GUIListViewEx_SetEditStatus($iLVIndex, 3, 1, 1, "1|6|1") ; UpDown with limit and wrap _GUIListViewEx_MsgRegister() GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch _GUIListViewEx_EventMonitor() WEnd 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 Ā Link to post Share on other sites
supersonic 5 Posted July 20, 2017 Share Posted July 20, 2017 (edited) Melba23, as reported in post #175 I have found anotherĀ missing variable declaration. I modified your UDF a bit and now I seems to work using "MustDeclareVars". Please see attachment forĀ comparison. Edited July 20, 2017 by supersonic Link to post Share on other sites
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