satanico64 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 comment Share on other sites More sharing options...
Moderators Melba23 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 comment Share on other sites More sharing options...
satanico64 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 comment Share on other sites More sharing options...
Moderators Melba23 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 comment Share on other sites More sharing options...
satanico64 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 comment Share on other sites More sharing options...
rootx 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 comment Share on other sites More sharing options...
Moderators Melba23 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 comment Share on other sites More sharing options...
rootx 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 comment Share on other sites More sharing options...
Moderators Melba23 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 comment Share on other sites More sharing options...
mLipok 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 * How to ask ChatGPT for AutoIt Code * 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) * Show_Macro_Values.au3 *  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: 2023-04-24 Link to comment Share on other sites More sharing options...
Moderators Melba23 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 comment Share on other sites More sharing options...
Gambler71 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 comment Share on other sites More sharing options...
Moderators Melba23 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 comment Share on other sites More sharing options...
mLipok 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 * How to ask ChatGPT for AutoIt Code * 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) * Show_Macro_Values.au3 *  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: 2023-04-24 Link to comment Share on other sites More sharing options...
supersonic 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 comment Share on other sites More sharing options...
Moderators Melba23 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 comment Share on other sites More sharing options...
JanZoudlik 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 comment Share on other sites More sharing options...
Moderators Melba23 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 comment Share on other sites More sharing options...
Moderators Melba23 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 comment Share on other sites More sharing options...
supersonic 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 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