Moderators Melba23 Posted February 12, 2016 Author Moderators Share Posted February 12, 2016 jazzyjeff, Quote do you think the problem could be caused by me doing a sort in the listview with this function? _GUICtrlListView_SimpleSort Quite possibly - currently when you set the UDF to use colour, it automatically disables the "sort on column header click" functionality as there is no way to determine the revised order once the function has run. As the row order is now unknown, there is no way to reset the existing colours to their rows. I am trying to work out a way to remove this limitation, but for the moment it remains. I am rather deep into another problem this evening - I will look again at your code tomorrow morning and see if I can suggest a revised version which might work. 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...
jazzyjeff Posted February 12, 2016 Share Posted February 12, 2016 No worries Melba. It's the weekend. I'll play around if time permits this weekend, but otherwise i'll be looking again on Monday. If you figure the SetColour function, then i'll perhaps give this ago and maybe this will do the trick for me. Thanks . Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 12, 2016 Author Moderators Share Posted February 12, 2016 jazzyjeff, Quote If you figure the SetColour function Try changing this line within that function - that is where I believe the problem lies ; Check position exists in ListView If $iRow < 0 Or $iCol < 0 Or $iRow > UBound($aColArray) - 2 Or $iCol > UBound($aColArray, 2) - 1 Then ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Return SetError(4, 0, 0) EndIf 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 February 15, 2016 Author Moderators Share Posted February 15, 2016 Hi all, As the fix was so small I have decided just to upload a new version to the first post - so anyone who downloaded the new colour version should please do so again. And keep your eyes open for some exciting new developments in the near future...... 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...
jazzyjeff Posted February 15, 2016 Share Posted February 15, 2016 Hey Melba, Thanks for your dedication on this. The change with the SetColour function has worked. The way my list works is it refreshes to monitor changes on installed software, so there is some flickering now, but that's my problem and not with this function. I think I can rework some things to stop the constant refresh. The colour in the list looks awesome. This is just what I wanted! Thanks. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 15, 2016 Author Moderators Share Posted February 15, 2016 jazzyjeff, Glad you like it - and thanks for reporting the problem. 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 March 7, 2016 Author Moderators Share Posted March 7, 2016 [NEW VERSION] - 7 Mar 16 Added: A new option for $iAdded (+ 512) allows you to select just one cell of the ListView rather than the whole row. A new function _GUIListViewEx_SetDefColours allows the user to set the default colours when using either or both the "colour" and "single cell selection" options. Another new function _GUIListViewEx_BlockReDraw which prevents ListView redrawing during looped Insert/Delete/Change calls - this greatly speeds up execution by avoiding lengthy redrawing when using either or both the "colour" and "single cell selection" options, use of which forces the redraw to use a WM_NOTIFY handler within the script. Changed: A number of minor internal changes to speed up the loading of the ListView when using either or both of the "colour" and "single cell selection" options. A slightly modified Example_6 script shows the new functions in use. The LH native ListView can have rows and columns added/removed using both the old and new functions and has a context menu to allow for colour selection. The contents of this ListView can be mirrored to the RH UDF-created ListView which has "single cell selection" enabled and allows the colours of any item (including the selected cell) to be changed programmatically. New UDF in the first post. M23 argumentum 1 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...
storme Posted March 14, 2016 Share Posted March 14, 2016 G'day It's been a while since I've used Autoit on anything of any size but it's time I got back in. I'd like to you use your UDF for "Todo list" programs of various purposes. To keep it short I'd like to move items between lists on the programs but keep track of or a link back to the origin of each of the items. A Master list of "thinks" that I drag into other list(s) (Save them for use later) and these items could be in the other lists multiple times .... eg Master list "Install Prog1, uninstall Prog1, Install Prog2, uninstall prog2, delete file a, delete file b List 1 delete file b, Install Prog1, delete file b, delete file a, uninstall Prog1, Install Prog2 (this maybe a unique way to install get prog "b" installed on a machine) Anyway, is there a way to tag a list item so it can be tracked? I was thinking of adding an extra column with an ID code but it would be visible to the user. I'm hoping there is a clean way of doing it. Thanks for the help and a great UDF it will do most of what I want to do once I get into it. John Some of my small contributions to AutoIt Browse for Folder Dialog - Automation SysTreeView32 | FileHippo Download and/or retrieve program information | Get installedpath from uninstall key in registry | RoboCopy function John Morrison aka Storm-E Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 15, 2016 Author Moderators Share Posted March 15, 2016 storme, I would just have a hidden column within the ListViews - like this: expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <MsgBoxConstants.au3> #include "GUIListViewEx.au3" $hGUI = GUICreate("Hidden Column ListView Example", 1000, 510) ; Create ListView $cLV_1 = GUICtrlCreateListView("Visible Column|Hidden Column|Visible Column", 10, 30, 480, 260, BitOR($LVS_SINGLESEL, $LVS_SHOWSELALWAYS)) _GUICtrlListView_SetExtendedListViewStyle($cLV_1, $LVS_EX_FULLROWSELECT) Global $aLVArray[6][3] For $i = 0 To 5 $aLVArray[$i][0] = "Visible " & $i & "-0" $aLVArray[$i][1] = "Hidden " & $i & "-1" $aLVArray[$i][2] = "Visible " & $i & "-2" $sData = $aLVArray[$i][0] & "|" & $aLVArray[$i][1] & "|" & $aLVArray[$i][2] GUICtrlCreateListViewItem($sData, $cLV_1) Next _GUICtrlListView_SetColumnWidth($cLV_1, 0, 100) _GUICtrlListView_SetColumnWidth($cLV_1, 1, 0) _GUICtrlListView_SetColumnWidth($cLV_1, 2, 100) $iLVIndex_1 = _GUIListViewEx_Init($cLV_1, $aLVArray) $hLV_2 = _GUICtrlListView_Create($hGUI, "", 510, 30, 480, 260, BitOr($LVS_REPORT, $LVS_SINGLESEL, $LVS_SHOWSELALWAYS, $WS_BORDER)) _GUICtrlListView_SetExtendedListViewStyle($hLV_2, $LVS_EX_FULLROWSELECT) _GUICtrlListView_AddColumn($hLV_2, "Open Column", 100) _GUICtrlListView_AddColumn($hLV_2, "Closed Column", 100) _GUICtrlListView_AddColumn($hLV_2, "Open Column", 100) For $i = 0 To 5 $aLVArray[$i][0] = "Open " & $i & "-0" $aLVArray[$i][1] = "Closed " & $i & "-1" $aLVArray[$i][2] = "Open " & $i & "-2" $sData = $aLVArray[$i][0] & "|" & $aLVArray[$i][1] & "|" & $aLVArray[$i][2] GUICtrlCreateListViewItem($sData, $hLV_2) $iIndex = _GUICtrlListView_AddItem($hLV_2, $aLVArray[$i][0]) _GUICtrlListView_AddSubItem($hLV_2, $iIndex, $aLVArray[$i][1], 1) _GUICtrlListView_AddSubItem($hLV_2, $iIndex, $aLVArray[$i][2], 2) Next _GUICtrlListView_SetColumnWidth($hLV_2, 1, 0) $iLVIndex_2 = _GUIListViewEx_Init($hLV_2, $aLVArray) $cRead_1 = GUICtrlCreateButton("Read Sel", 10, 310, 80, 30) $cRead_2 = GUICtrlCreateButton("Read Sel", 510, 310, 80, 30) GUISetState() _GUIListViewEx_MsgRegister() While 1 $iMsg = GUIGetMsg() Switch $iMsg Case $GUI_EVENT_CLOSE Exit Case $cRead_1 $cCID = GUICtrlRead($cLV_1) $sText = GUICtrlRead($cCID) MsgBox($MB_SYSTEMMODAL, "Selected text", $sText) Case $cRead_2 $iIndex = _GUICtrlListView_GetSelectedIndices($hLV_2) $sText = _GUICtrlListView_GetItemTextString($hLV_2, $iIndex) MsgBox($MB_SYSTEMMODAL, "Selected text", $sText) EndSwitch If _GUIListViewEx_DragEvent() Then _GUICtrlListView_SetColumnWidth($cLV_1, 1, 0) EndIf WEnd You can see that the hidden text is still there by reading the selected items. By the way, try commenting out the small _GUIListViewEx_DragEvent section and see what happens. 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...
storme Posted March 15, 2016 Share Posted March 15, 2016 Thank you! That is exactly what I was hoping for. I just wanted to make sure you didn't have some secret voodoo that I didn't know about. Sorry not sure what the _GUIListViewEx_DragEvent did/didn't do... I was expecting the hidden column to become visible with those lines commented out but nothing changed. Again thanks for a great UDF and all your help!!! Onward and upward John Some of my small contributions to AutoIt Browse for Folder Dialog - Automation SysTreeView32 | FileHippo Download and/or retrieve program information | Get installedpath from uninstall key in registry | RoboCopy function John Morrison aka Storm-E Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 15, 2016 Author Moderators Share Posted March 15, 2016 storme, If you comment out those lines and drag between the ListView, the hidden column in the LH ListView (the native created one) will indeed become visible. This is a "feature" of native ListViews I discovered some time back and the various data insertion functions within the UDF have a $fRetainWidth parameter to prevent the column size being reset. All that section does is look for a drag event and then reset the 0 size of the relevant column if one occurs, thus making it visible for only a very short (a few ms) period. Do come back if you need any more help in integrating the UDF into your code. M23 storme 1 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...
Screech Posted March 16, 2016 Share Posted March 16, 2016 Hello, Sorry for my english (I'm French) I will try to explain all my problem clearly I make a little script with 3 LV and only drag & drop (with your UDF). It's work great on my PC (windows 7) but I have a contact who have some trouble on his Windows 10. When he drag 1 line from the first LV to a second one, there is 3 lines who where dropped and a 4 disapear from the first LV. Ex : If I Have in my first VL : 'A,B,C,D,E' I Drag & drop 'B' to the second LV And 'B,C,D,E' disapear from the first LV and there is 'B,C,D' on the second one.. I can't explain it. This a link to my github with the source and all the UDF needed (including yours) : Universal ROM Cleaner And this is the full code : (If you want to test, you need some file like the language one. You can foud them on Github) expandcollapse popup#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=Ressources\Universal_Rom_Cleaner.ico #AutoIt3Wrapper_Outfile=..\BIN\Universal_Rom_Cleaner.exe #AutoIt3Wrapper_Outfile_x64=..\BIN\Universal_Rom_Cleaner64.exe #AutoIt3Wrapper_Res_Description=Nettoyeur de Rom Universel #AutoIt3Wrapper_Res_Fileversion=1.0.0.1 #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=p #AutoIt3Wrapper_Res_LegalCopyright=LEGRAS David #AutoIt3Wrapper_Res_Language=1036 #AutoIt3Wrapper_AU3Check_Stop_OnWarning=y #AutoIt3Wrapper_Run_Tidy=y #Tidy_Parameters=/reel #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** ;************************************************************************* ;** ** ;** Universal Rom Cleaner ** ;** LEGRAS David ** ;** ** ;************************************************************************* ;Définition des librairies ;------------------------- #include <String.au3> #include <Array.au3> #include <File.au3> #include <GuiListView.au3> #include <GUIConstantsEx.au3> #include <ListViewConstants.au3> #include <WindowsConstants.au3> #include <MsgBoxConstants.au3> #include <FileConstants.au3> #include <ComboConstants.au3> #include "./Include/_MultiLang.au3" #include "./Include/_GUIListViewEx.au3" #include "./Include/_ExtMsgBox.au3" #include "./Include/_Trim.au3" ;FileInstall ;----------- Global $SOURCE_DIRECTORY = @ScriptDir If Not _FileCreate($SOURCE_DIRECTORY & "\test") Then ;Vérification des droits en écriture $SOURCE_DIRECTORY = @AppDataDir & "\Universal_ROM_Tools" DirCreate($SOURCE_DIRECTORY) Else FileDelete($SOURCE_DIRECTORY & "\test") EndIf DirCreate($SOURCE_DIRECTORY & "\LanguageFiles") DirCreate($SOURCE_DIRECTORY & "\Ressources") FileInstall(".\URC-config.ini", $SOURCE_DIRECTORY & "\URC-config.ini") FileInstall(".\LanguageFiles\URC-ENGLISH.XML", $SOURCE_DIRECTORY & "\LanguageFiles\URC-ENGLISH.XML") FileInstall(".\LanguageFiles\URC-FRENCH.XML", $SOURCE_DIRECTORY & "\LanguageFiles\URC-FRENCH.XML") FileInstall(".\Ressources\Universal_Rom_Cleaner.ico", $SOURCE_DIRECTORY & "\Ressources\Universal_Rom_Cleaner.ico") ;Définition des Variables ;------------------------- Global $PathConfigINI = $SOURCE_DIRECTORY & "\URC-config.ini" Global $LANG_DIR = $SOURCE_DIRECTORY & "\LanguageFiles"; Where we are storing the language files. Global $user_lang = IniRead($PathConfigINI, "LAST_USE", "$user_lang", "default") Global $path_LOG = IniRead($PathConfigINI, "GENERAL", "Path_LOG", $SOURCE_DIRECTORY & "\log.txt") Global $path_SIMUL = IniRead($PathConfigINI, "GENERAL", "path_SIMUL", $SOURCE_DIRECTORY & "\simulation.txt") Local $V_ROMPath, $I_LV_ATTRIBUTE, $I_LV_SUPPRESS, $I_LV_IGNORE, $A_ROMList, $A_ROMAttribut If @Compiled Then $Rev = "BETA " & FileGetVersion(@ScriptFullPath) Else $Rev = 'In Progress' EndIf ;---------; ;Principal; ;---------; _LANG_LOAD($LANG_DIR, $user_lang) ;Chargement de la langue par défaut #Region ### START Koda GUI section ### Form= ;Création de l'interface $F_UniversalCleaner = GUICreate(_MultiLang_GetText("main_gui"), 523, 343, 192, 124) GUISetBkColor(0x34495C) $H_MF = GUICtrlCreateMenu(_MultiLang_GetText("mnu_file")) $H_MF_ROM = GUICtrlCreateMenuItem(_MultiLang_GetText("mnu_file_roms"), $H_MF) $H_MF_LANGUE = GUICtrlCreateMenuItem(_MultiLang_GetText("mnu_file_langue"), $H_MF) $H_MF_Separation = GUICtrlCreateMenuItem("", $H_MF) $H_MF_Exit = GUICtrlCreateMenuItem(_MultiLang_GetText("mnu_file_exit"), $H_MF) $H_MA = GUICtrlCreateMenu(_MultiLang_GetText("mnu_action")) $H_MA_SIMULATION = GUICtrlCreateMenuItem(_MultiLang_GetText("mnu_action_simulation"), $H_MA) $H_MA_CLEAN = GUICtrlCreateMenuItem(_MultiLang_GetText("mnu_action_clean"), $H_MA) $H_MH = GUICtrlCreateMenu(_MultiLang_GetText("mnu_help")) $H_MH_About = GUICtrlCreateMenuItem(_MultiLang_GetText("mnu_help_about"), $H_MH) $H_LV_ATTRIBUTE = GUICtrlCreateListView(_MultiLang_GetText("lv_attribute"), 8, 8, 250, 302, $LVS_SHOWSELALWAYS) _GUICtrlListView_SetExtendedListViewStyle($H_LV_ATTRIBUTE, $LVS_EX_FULLROWSELECT) _GUICtrlListView_SetColumnWidth($H_LV_ATTRIBUTE, 0, 225) $H_LV_SUPPRESS = GUICtrlCreateListView(_MultiLang_GetText("lv_suppress"), 264, 8, 250, 150, $LVS_SHOWSELALWAYS) _GUICtrlListView_SetExtendedListViewStyle($H_LV_SUPPRESS, $LVS_EX_FULLROWSELECT) _GUICtrlListView_SetColumnWidth($H_LV_SUPPRESS, 0, 225) $H_LV_IGNORE = GUICtrlCreateListView(_MultiLang_GetText("lv_ignore"), 264, 160, 250, 150, $LVS_SHOWSELALWAYS) _GUICtrlListView_SetExtendedListViewStyle($H_LV_IGNORE, $LVS_EX_FULLROWSELECT) _GUICtrlListView_SetColumnWidth($H_LV_IGNORE, 0, 225) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 ; Gestion de l'interface $nMsg = GUIGetMsg() Switch $nMsg Case $H_MF_ROM ;Menu Fichier/Charger le repertoire des ROMs _GUICtrlListView_DeleteAllItems($H_LV_ATTRIBUTE) _GUICtrlListView_DeleteAllItems($H_LV_SUPPRESS) _GUICtrlListView_DeleteAllItems($H_LV_IGNORE) $V_ROMPath = FileSelectFolder(_MultiLang_GetText("win_sel_rom_Title"), "", $FSF_CREATEBUTTON, "C:\") If StringRight($V_ROMPath, 1) <> '\' Then $V_ROMPath = $V_ROMPath & '\' $A_ROMList = _CREATEARRAY_ROM($V_ROMPath) $A_ROMAttribut = _CREATEARRAY_ATTRIBUT($A_ROMList) For $B_ROMAttribut = 0 To UBound($A_ROMAttribut) - 1 _GUICtrlListView_AddItem($H_LV_ATTRIBUTE, $A_ROMAttribut[$B_ROMAttribut]) Next $I_LV_ATTRIBUTE = _GUIListViewEx_Init($H_LV_ATTRIBUTE, $A_ROMAttribut, 0, 0, True) $I_LV_SUPPRESS = _GUIListViewEx_Init($H_LV_SUPPRESS, "", 0, 0, True) $I_LV_IGNORE = _GUIListViewEx_Init($H_LV_IGNORE, "", 0, 0, True) _GUIListViewEx_MsgRegister() ;Register pour le drag&drop _GUIListViewEx_SetActive(1) ;Activation de la LV de gauche Case $H_MF_LANGUE ;Menu Fichier/Langues _LANG_LOAD($LANG_DIR, -1) _GUI_REFRESH() Case $GUI_EVENT_CLOSE, $H_MF_Exit ;Quitter Exit Case $H_MA_SIMULATION ;Menu Action/Simulation $A_ROMList = _MOVE_ROM($V_ROMPath, $I_LV_ATTRIBUTE, $A_ROMList) $A_ROMList = _SUPPR_ROM($V_ROMPath, $I_LV_SUPPRESS, $A_ROMList) _CLEAN_ROM($V_ROMPath, $A_ROMList, 0) Case $H_MA_CLEAN ;Menu Action/Nettoyage $A_ROMList = _MOVE_ROM($V_ROMPath, $I_LV_ATTRIBUTE, $A_ROMList) $A_ROMList = _SUPPR_ROM($V_ROMPath, $I_LV_SUPPRESS, $A_ROMList) _CLEAN_ROM($V_ROMPath, $A_ROMList, 1) Case $H_MH_About ;Menu Aide/A propos $sMsg = "UNIVERSAL ROM CLEANER - " & $Rev & @CRLF $sMsg &= _MultiLang_GetText("win_About_By") & @CRLF & @CRLF $sMsg &= _MultiLang_GetText("win_About_Thanks") & @CRLF $sMsg &= "http://www.screenzone.fr/" & @CRLF $sMsg &= "http://www.screenscraper.fr/" & @CRLF $sMsg &= "http://www.recalbox.com/" & @CRLF $sMsg &= "http://www.emulationstation.org/" & @CRLF _ExtMsgBoxSet(1, 2, 0x34495c, 0xFFFF00, 10, "Arial") _ExtMsgBox($EMB_ICONINFO, "OK", _MultiLang_GetText("win_About_Title"), $sMsg, 15) EndSwitch WEnd ;---------; ;Fonctions; ;---------; Func _GUI_REFRESH() ;Rafraichissement de l'interface GUICtrlSetData($H_MF, _MultiLang_GetText("mnu_file")) GUICtrlSetData($H_MF_ROM, _MultiLang_GetText("mnu_file_roms")) GUICtrlSetData($H_MF_LANGUE, _MultiLang_GetText("mnu_file_langue")) GUICtrlSetData($H_MF_Exit, _MultiLang_GetText("mnu_file_exit")) GUICtrlSetData($H_MA, _MultiLang_GetText("mnu_action")) GUICtrlSetData($H_MA_SIMULATION, _MultiLang_GetText("mnu_action_simulation")) GUICtrlSetData($H_MA_CLEAN, _MultiLang_GetText("mnu_action_clean")) GUICtrlSetData($H_MH, _MultiLang_GetText("mnu_help")) GUICtrlSetData($H_MH_About, _MultiLang_GetText("mnu_help_about")) GUICtrlSetData($H_LV_ATTRIBUTE, _MultiLang_GetText("lv_attribute")) GUICtrlSetData($H_LV_SUPPRESS, _MultiLang_GetText("lv_suppress")) GUICtrlSetData($H_LV_IGNORE, _MultiLang_GetText("lv_ignore")) EndFunc ;==>_GUI_REFRESH Func _CREATEARRAY_ROM($V_ROMPath) ;Création de la liste des ROMs (Chemin des ROMs) Local $A_ROMList = _FileListToArray($V_ROMPath, "*.*z*") ProgressOn(_MultiLang_GetText("prbr_createarray_rom_title"), "", "0%") If @error = 1 Then MsgBox($MB_SYSTEMMODAL, "", $V_ROMPath & " - Path was invalid.") Exit EndIf If @error = 4 Then MsgBox($MB_SYSTEMMODAL, "", "No file(s) were found.") Exit EndIf For $B_COLINSRT = 1 To 4 _ArrayColInsert($A_ROMList, $B_COLINSRT) Next For $B_ROMList = 0 To UBound($A_ROMList) - 1 $V_ProgressPRC = Round(($B_ROMList * 100) / (UBound($A_ROMList) - 1)) ProgressSet($V_ProgressPRC, _MultiLang_GetText("prbr_createarray_rom_progress") & $V_ProgressPRC & "%") $A_ROMList[$B_ROMList][3] = $A_ROMList[$B_ROMList][0] $A_ROMList[$B_ROMList][0] = StringReplace($A_ROMList[$B_ROMList][0], '[', '(') $A_ROMList[$B_ROMList][0] = StringReplace($A_ROMList[$B_ROMList][0], ']', ')') $TMP_Path = StringSplit($A_ROMList[$B_ROMList][0], "(") If $TMP_Path[1] = "" Then $TMP_Path = StringSplit($A_ROMList[$B_ROMList][0], ")") $TMP_Path = StringSplit($TMP_Path[2], "(") EndIf $A_ROMList[$B_ROMList][1] = _ALLTRIM($TMP_Path[1]) Next ;~ _ArrayDisplay($A_ROMList, '$A_ROMList Full') ; Debug _ArrayDelete($A_ROMList, "0") _ArraySort($A_ROMList) ;~ _ArrayDisplay($A_ROMList, '$A_ROMList Clean & Sorted') ; Debug ProgressOff() Return $A_ROMList EndFunc ;==>_CREATEARRAY_ROM Func _CREATEARRAY_ATTRIBUT($A_ROMList) ;Création de la liste des Attributs (Array des ROMs) Local $A_ROMAttribut[1] ProgressOn(_MultiLang_GetText("prbr_createarray_attribut_title"), "", "0%") For $B_ROMList = 0 To UBound($A_ROMList) - 1 $V_ProgressPRC = Round(($B_ROMList * 100) / (UBound($A_ROMList) - 1)) ProgressSet($V_ProgressPRC, _MultiLang_GetText("prbr_createarray_attribut_progress") & $V_ProgressPRC & "%") _ArrayAdd($A_ROMAttribut, _ArrayToString(_StringBetween($A_ROMList[$B_ROMList][0], "(", ")"))) Next ;~ _ArrayDisplay($A_ROMAttribut, '$A_ROMAttribut Full') ; Debug $A_ROMAttribut = _ArrayUnique($A_ROMAttribut) ;~ _ArrayDisplay($A_ROMAttribut, '$A_ROMAttribut Unique') ; Debug _ArrayDelete($A_ROMAttribut, "0;1") _ArraySort($A_ROMAttribut) ;~ _ArrayDisplay($A_ROMAttribut, '$A_ROMAttribut Clean & Sorted') ; Debug ProgressOff() Return $A_ROMAttribut EndFunc ;==>_CREATEARRAY_ATTRIBUT Func _MOVE_ROM($V_ROMPath, $I_LV_ATTRIBUTE, $A_ROMList) ;Définition des ROMs à deplacer (Chemin des ROMs, Indexe de la LV des attributs triés, Array des ROMs) Local $A_TEMP_RomList ProgressOn(_MultiLang_GetText("prbr_move_rom_title"), "", "0%") $A_LV_ATTRIBUTE = _GUIListViewEx_ReturnArray($I_LV_ATTRIBUTE) _ArrayReverse($A_LV_ATTRIBUTE) For $B_ROMList = 0 To UBound($A_ROMList) - 1 $A_ROMList[$B_ROMList][2] = 0 Next ;~ _ArrayDisplay($A_ROMList, '$A_ROMList Reversed & Completed') ; Debug For $B_ROMList = 0 To UBound($A_ROMList) - 1 $V_ProgressPRC = Round(($B_ROMList * 100) / (UBound($A_ROMList) - 1)) ProgressSet($V_ProgressPRC, _MultiLang_GetText("prbr_move_rom_progress") & $V_ProgressPRC & "%") For $B_LV_ATTRIBUTE = 0 To UBound($A_LV_ATTRIBUTE) - 1 If StringInStr($A_ROMList[$B_ROMList][0], "(" & $A_LV_ATTRIBUTE[$B_LV_ATTRIBUTE] & ")") > 0 Then $A_ROMList[$B_ROMList][2] = $A_ROMList[$B_ROMList][2] + (($B_LV_ATTRIBUTE + 1) * 10) ConsoleWrite("+" & $A_ROMList[$B_ROMList][0] & ' -> ' & "(" & $A_LV_ATTRIBUTE[$B_LV_ATTRIBUTE] & ") ===> " & $A_ROMList[$B_ROMList][2] & '+' & ($B_LV_ATTRIBUTE * 10) & @CRLF) ; Debug EndIf Next $A_ROMList[$B_ROMList][3] = $A_ROMList[$B_ROMList][1] & $A_ROMList[$B_ROMList][2] Next ;~ _ArrayDisplay($A_ROMList, '$A_ROMList Completed') ; Debug _ArraySort($A_ROMList, 0, 0, 0, 3) ;~ _ArrayDisplay($A_ROMList, '$A_ROMList Sorted') ; Debug ProgressOff() Return $A_ROMList EndFunc ;==>_MOVE_ROM Func _SUPPR_ROM($V_ROMPath, $I_LV_SUPPRESS, $A_ROMList) ;Définition des ROMs à ne pas garder (Chemin des ROMs, Indexe de la LV des attributs non conservé, Array des ROMs) ProgressOn(_MultiLang_GetText("prbr_suppr_rom_title"), "", "0%") $A_LV_SUPPRESS = _GUIListViewEx_ReturnArray($I_LV_SUPPRESS) For $B_ROMList = 0 To UBound($A_ROMList) - 1 $V_ProgressPRC = Round(($B_ROMList * 100) / (UBound($A_ROMList) - 1)) ProgressSet($V_ProgressPRC, _MultiLang_GetText("prbr_suppr_rom_progress") & $V_ProgressPRC & "%") For $B_LV_SUPPRESS = 0 To UBound($A_LV_SUPPRESS) - 1 If StringInStr($A_ROMList[$B_ROMList][0], "(" & $A_LV_SUPPRESS[$B_LV_SUPPRESS] & ")") > 0 Then ConsoleWrite($V_ROMPath & $A_ROMList[$B_ROMList][0] & ' -> ' & $V_ROMPath & "MOVED\" & $A_ROMList[$B_ROMList][1] & StringRight($A_ROMList[$B_ROMList][0], 4) & @CRLF) ; Debug $A_ROMList[$B_ROMList][2] = "SUPPR" EndIf Next Next ;~ _ArrayDisplay($A_ROMList, '$A_ROMList Completed') ; Debug ProgressOff() Return $A_ROMList EndFunc ;==>_SUPPR_ROM Func _CLEAN_ROM($V_ROMPath, $A_ROMList, $TMP_Action = 0) ;Nettoyage des ROMs (Chemin des ROMs, Array des ROMs, Action = 0-Simulation;1-Nettoyage) ProgressOn(_MultiLang_GetText("prbr_clean_rom_title"), "", "0%") $A_ROMList_CLEAN = $A_ROMList For $B_ROMList = UBound($A_ROMList_CLEAN) - 1 To 0 Step -1 $V_ProgressPRC = Round((((UBound($A_ROMList_CLEAN) - 1) - $B_ROMList) * 100) / (UBound($A_ROMList_CLEAN) - 1)) ProgressSet($V_ProgressPRC, _MultiLang_GetText("prbr_clean_rom_progress0") & $V_ProgressPRC & "%") If $A_ROMList_CLEAN[$B_ROMList][2] = "SUPPR" Then _ArrayDelete($A_ROMList_CLEAN, $B_ROMList) EndIf Next Local $D_ROMList = ObjCreate("Scripting.Dictionary") If @error Then Exit MsgBox(17, '', 'ERROR getting object') For $B_ROMList = 0 To UBound($A_ROMList_CLEAN) - 1 $V_ProgressPRC = Round(($B_ROMList * 100) / (UBound($A_ROMList_CLEAN) - 1)) ProgressSet($V_ProgressPRC, _MultiLang_GetText("prbr_clean_rom_progress1") & $V_ProgressPRC & "%") If Not $D_ROMList.exists($A_ROMList_CLEAN[$B_ROMList][1]) Then $D_ROMList.add($A_ROMList_CLEAN[$B_ROMList][1], $A_ROMList_CLEAN[$B_ROMList][0]) Else $D_ROMList.item($A_ROMList_CLEAN[$B_ROMList][1]) = $A_ROMList_CLEAN[$B_ROMList][3] EndIf Next Local $K_ROMList = $D_ROMList.keys(), $A_ROMList_TEMP[$D_ROMList.count()][2] For $B_ROMList = 0 To UBound($K_ROMList) - 1 $V_ProgressPRC = Round(($B_ROMList * 100) / (UBound($K_ROMList) - 1)) ProgressSet($V_ProgressPRC, _MultiLang_GetText("prbr_clean_rom_progress3") & $V_ProgressPRC & "%") $A_ROMList_TEMP[$B_ROMList][0] = $D_ROMList.Item($K_ROMList[$B_ROMList]) $A_ROMList_TEMP[$B_ROMList][1] = $K_ROMList[$B_ROMList] Next ;~ _ArrayDisplay($A_ROMList, "$A_ROMList");Debug ;~ _ArrayDisplay($A_ROMList_TEMP, "$A_ROMList_TEMP");Debug Dim $A_ROMList_SIMUL[UBound($A_ROMList)][2] For $B_ROMList = 0 To UBound($A_ROMList) - 1 $V_ProgressPRC = Round(($B_ROMList * 100) / (UBound($A_ROMList) - 1)) ProgressSet($V_ProgressPRC, _MultiLang_GetText("prbr_clean_rom_progress3") & $V_ProgressPRC & "%") For $B_ROMList_TEMP = 0 To UBound($A_ROMList_TEMP) - 1 If $A_ROMList[$B_ROMList][0] = $A_ROMList_TEMP[$B_ROMList_TEMP][0] Then $A_ROMList[$B_ROMList][2] = "KEEP" Next Next For $B_ROMList_SIMUL = 0 To UBound($A_ROMList_SIMUL) - 1 $V_ProgressPRC = Round(($B_ROMList_SIMUL * 100) / (UBound($A_ROMList_SIMUL) - 1)) ProgressSet($V_ProgressPRC, _MultiLang_GetText("prbr_clean_rom_progress4") & $V_ProgressPRC & "%") Select Case $A_ROMList[$B_ROMList_SIMUL][2] = "KEEP" $A_ROMList_SIMUL[$B_ROMList_SIMUL][0] = "OK" $A_ROMList_SIMUL[$B_ROMList_SIMUL][1] = $A_ROMList[$B_ROMList_SIMUL][0] Case Else $A_ROMList_SIMUL[$B_ROMList_SIMUL][0] = "KO" $A_ROMList_SIMUL[$B_ROMList_SIMUL][1] = $A_ROMList[$B_ROMList_SIMUL][0] EndSelect Next ;~ _ArrayDisplay($A_ROMList_SIMUL, "$A_ROMList_SIMUL");Debug _FileWriteFromArray($path_SIMUL, $A_ROMList_SIMUL, 1) ;~ _ArrayDisplay($A_ROMList_TEMP, "result");Debug If $TMP_Action = 1 Then For $B_ROMList = 0 To UBound($A_ROMList_TEMP) - 1 $V_ProgressPRC = Round(($B_ROMList * 100) / (UBound($A_ROMList_TEMP) - 1)) ProgressSet($V_ProgressPRC, _MultiLang_GetText("prbr_clean_rom_progress2") & $V_ProgressPRC & "%") FileMove($V_ROMPath & $A_ROMList_TEMP[$B_ROMList][0], $V_ROMPath & "CLEAN_ROM\", BitOR($FC_OVERWRITE, $FC_CREATEPATH)) Next ProgressOff() Else ProgressOff() ; Display the file. ShellExecute($path_SIMUL) EndIf EndFunc ;==>_CLEAN_ROM Func _LANG_LOAD($LANG_DIR, $user_lang) ;Chargement de la langue (Chemin des fichiers de langues, Id de la langue) ;Create an array of available language files ; ** n=0 is the default language file ; [n][0] = Display Name in Local Language (Used for Select Function) ; [n][1] = Language File (Full path. In this case we used a $LANG_DIR ; [n][2] = [Space delimited] Character codes as used by @OS_LANG (used to select correct lang file) Local $LANGFILES[2][3] $LANGFILES[0][0] = "English (US)" ; $LANGFILES[0][1] = $LANG_DIR & "\URC-ENGLISH.XML" $LANGFILES[0][2] = "0409 " & _ ;English_United_States "0809 " & _ ;English_United_Kingdom "0c09 " & _ ;English_Australia "1009 " & _ ;English_Canadian "1409 " & _ ;English_New_Zealand "1809 " & _ ;English_Irish "1c09 " & _ ;English_South_Africa "2009 " & _ ;English_Jamaica "2409 " & _ ;English_Caribbean "2809 " & _ ;English_Belize "2c09 " & _ ;English_Trinidad "3009 " & _ ;English_Zimbabwe "3409" ;English_Philippines $LANGFILES[1][0] = "Français" ; French $LANGFILES[1][1] = $LANG_DIR & "\URC-FRENCH.XML" $LANGFILES[1][2] = "040c " & _ ;French_Standard "080c " & _ ;French_Belgian "0c0c " & _ ;French_Canadian "100c " & _ ;French_Swiss "140c " & _ ;French_Luxembourg "180c" ;French_Monaco ;Set the available language files, names, and codes. _MultiLang_SetFileInfo($LANGFILES) If @error Then MsgBox(48, "Error", "Could not set file info. Error Code " & @error) Exit EndIf ;Check if the loaded settings file exists. If not ask user to select language. If $user_lang = -1 Then ;Create Selection GUI $user_lang = _LANGUE_SelectGUI($LANGFILES) If @error Then MsgBox(48, "Error", "Could not create selection GUI. Error Code " & @error) Exit EndIf IniWrite($PathConfigINI, "LAST_USE", "$user_lang", $user_lang) EndIf Local $ret = _MultiLang_LoadLangFile($user_lang) If @error Then MsgBox(48, "Error", "Could not load lang file. Error Code " & @error) Exit EndIf ;If you supplied an invalid $user_lang, we will load the default language file If $ret = 2 Then MsgBox(64, "Information", "Just letting you know that we loaded the default language file") EndIf Return $LANGFILES EndFunc ;==>_LANG_LOAD Func _LANGUE_SelectGUI($_gh_aLangFileArray, $default = @OSLang) ;Interface de séléction de la langue (Array des langues, langue par défaut) GUISetState(@SW_DISABLE, $F_UniversalCleaner) If $_gh_aLangFileArray = -1 Then Return SetError(1, 0, 0) If IsArray($_gh_aLangFileArray) = 0 Then Return SetError(1, 0, 0) Local $_multilang_gui_GUI = GUICreate(_MultiLang_GetText("win_sel_langue_Title"), 230, 100) Local $_multilang_gui_Combo = GUICtrlCreateCombo("(" & _MultiLang_GetText("win_sel_langue_Title") & ")", 8, 48, 209, 25, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL)) Local $_multilang_gui_Button = GUICtrlCreateButton(_MultiLang_GetText("win_sel_langue_button"), 144, 72, 75, 25) Local $_multilang_gui_Label = GUICtrlCreateLabel(_MultiLang_GetText("win_sel_langue_text"), 8, 8, 212, 33) ;Create List of available languages For $i = 0 To UBound($_gh_aLangFileArray) - 1 GUICtrlSetData($_multilang_gui_Combo, $_gh_aLangFileArray[$i][0], "(" & _MultiLang_GetText("win_sel_langue_Title") & ")") Next GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case -3, $_multilang_gui_Button ExitLoop EndSwitch WEnd Local $_selected = GUICtrlRead($_multilang_gui_Combo) GUIDelete($_multilang_gui_GUI) For $i = 0 To UBound($_gh_aLangFileArray) - 1 If StringInStr($_gh_aLangFileArray[$i][0], $_selected) Then GUISetState(@SW_ENABLE, $F_UniversalCleaner) WinActivate($F_UniversalCleaner) Return StringLeft($_gh_aLangFileArray[$i][2], 4) EndIf Next GUISetState(@SW_ENABLE, $F_UniversalCleaner) WinActivate($F_UniversalCleaner) Return $default EndFunc ;==>_LANGUE_SelectGUI Have you some hint to track down the problem ? Thank you very much. Link to comment Share on other sites More sharing options...
dmob Posted March 16, 2016 Share Posted March 16, 2016 Hi Melba Thank you for this great UDF, I have used it in almost all my projects. Any ideas on how I can use a date picker instead of edit or combo? I am willing to put in the work myself, just thought I would run it by you in case..... Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 16, 2016 Author Moderators Share Posted March 16, 2016 dmob, I believe that all you would need to do is to use a date control in place of the edit/combo control created in the __GUIListViewEx_EditProcess function. Thanks for the offer to help, but I will take a quick look this afternoon and see if there are any major hiccups that present themselves. 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 March 16, 2016 Author Moderators Share Posted March 16, 2016 (edited) dmob, That was not too difficult. Have a play with this Beta version and see what you think. Once you have selected a date press {ENTER} to have it accepted; pressing {ESCAPE} cancels the change: <snip> Let me know of any improvements you feel might be needed. M23 Edited June 2, 2016 by Melba23 Beta code removed 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...
dmob Posted March 16, 2016 Share Posted March 16, 2016 Hi Melba Thank you for the quick response and taking time to create a solution. I shall try the mod and report back. Big up to you - flying must have turned you into an angel ... for us noobs Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 17, 2016 Author Moderators Share Posted March 17, 2016 (edited) dmob, I have been playing around with this and have a developed a version of the UDF where you can define the required default date for the DTP as well as the format you wish it to use: <snip> The basic editing code is unchanged, so there is no change to how the user interacts with the control. M23 Edited March 17, 2016 by Melba23 Beta code removed 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...
dmob Posted March 17, 2016 Share Posted March 17, 2016 (edited) Hi Melba The version you released yesterday worked well. I was just fiddling around to see if I can get the date accepted upon clicking date, instead of pressing Enter. During that time I noticed what might be a bug: After selecting date and pressing right arrow, the next column selected would also display a date picker even if though column was set for combo. However double-clicking the combo column directly correctly displays the combo. Sadly the newest version seems to be broken: "D:\Scripts\GUIListViewEx\GLVEx_Example_Date.au3" (84) : ==> Variable used without being declared.: Case $GUI_EVENT_CLOSE, $cExit_Button Case $GUI_EVENT_CLOSE, ^ ERROR and if I comment out $xExitButton: Quote "D:\Scripts\GUIListViewEx\GLVEx_Example_Date.au3" (87) : ==> Variable used without being declared.: Case $cDisplay_Left_Button Case ^ ERROR .... and I have overwritten the working version with the broken Also, in the UDF you forgot the $sDateCols variable although you mention it in the header Quote ; Syntax.........: _GUIListViewEx_Init($hLV, [$aArray = ""[, $iStart = 0[, $iColour[, $fImage[, $iAdded[, $sCols[, $sDateCols]]]]]]]) Func _GUIListViewEx_Init($hLV, $aArray = "", $iStart = 0, $iColour = 0, $fImage = False, $iAdded = 0, $sCols = "*") and, the example list view does not display datepicker, just an edit: Edited March 17, 2016 by dmob Misspelling Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 17, 2016 Author Moderators Share Posted March 17, 2016 (edited) dmob, Sorry about that - I have no idea what happened. Let me look at the code and see if I can fix the bugs you noticed - and get the example working again. M23 Edit: Quick update: The example had lost some lines - I have no idea how. Easy to fix. I had not forgotten the $sDateCols parameter - it is no longer used in the new UDF. You use the _GUIListViewEx_DTPData function to set a column to use data controls. I can see the problem with the right/left arrow and I know what is causing it - now to work out how to fix it! Edited March 17, 2016 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...
Moderators Melba23 Posted March 17, 2016 Author Moderators Share Posted March 17, 2016 (edited) dmob, Back again - I think I have it working now. The problem was that the code was honouring the $iEditMode set regardless of the type of control required in a column - I have now rewritten it so that the $iEditMode setting only affects simple edit controls, while a combo/DTP control ignores that setting completely and always returns after a single edit. I also added checks that make sure that not only is the next column editable, but that it has not been set to a combo/DTP control so that you do not get an edit control moving automatically into a combo/DTP column. I hope they work this time! M23 Edited June 2, 2016 by Melba23 Beta code removed 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...
Recommended Posts