Jump to content

Search the Community

Showing results for tags 'ListView Multi-select'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Location


WWW


Interests

Found 1 result

  1. Struggling to find a solution for this script, I can get multi-select of rows using the Shift+click, but not with the checkboxes. Appreciate any help. #include <GUIConstantsEx.au3> #include <GuiListView.au3> #include <GuiImageList.au3> #include <WindowsConstants.au3> #Include <GuiListBox.au3> ;_GUICtrlListBox_GetSelItems($hWnd) Opt("GUIOnEventMode", 1) ; 1 = enable. Opt("GUICloseOnESC", 1) ; 1 = Send the $GUI_EVENT_CLOSE message when ESC is pressed (default). Opt('MustDeclareVars', 1) Global $hListView, $hListView2 _Example1() While 1 Sleep(3000) WEnd Func _Example1() Local $hImage, $aIcons[3] = [0, 3, 6] Local $iExWindowStyle = BitOR($WS_EX_DLGMODALFRAME, $WS_EX_CLIENTEDGE, $LVS_REPORT,$LVS_SHOWSELALWAYS) Local $iExListViewStyle = BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_SUBITEMIMAGES, $LVS_EX_GRIDLINES, $LVS_EX_CHECKBOXES, $LVS_EX_DOUBLEBUFFER, $LVS_EX_GRIDLINES) GUICreate("ListView Sort", 250, 400) GUISetOnEvent($GUI_EVENT_CLOSE, "CloseGUI") $hListView = GUICtrlCreateListView("Column1 |Column2 |Column3 ", 2, 2, 248, 399, $iExWindowStyle, $iExListViewStyle) ;_GUICtrlListView_SetExtendedListViewStyle($hListView, $iExListViewStyle) _GUICtrlListView_SetColumnWidth($hListView,0,$LVSCW_AUTOSIZE_USEHEADER) _GUICtrlListView_SetColumnWidth($hListView,1,$LVSCW_AUTOSIZE_USEHEADER) _GUICtrlListView_SetColumnWidth($hListView,2,$LVSCW_AUTOSIZE_USEHEADER) GUICtrlSetOnEvent($hListView, "sort") ; Load images $hImage = _GUIImageList_Create(18, 18, 5, 3) _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", 74) _GUICtrlListView_SetImageList($hListView, $hImage, 1) _AddRow($hListView, "ABC|000666|10.05.2004", $aIcons) _AddRow($hListView, "DEF|444|11.05.2005", $aIcons) _AddRow($hListView, "CDE|555|12.05.2004", $aIcons) _AddRow($hListView, "CDE|555|12.05.2004", $aIcons) _AddRow($hListView, "CDE|555|12.05.2004", $aIcons) _AddRow($hListView, "CDE|555|12.05.2004", $aIcons) _AddRow($hListView, "CDE|555|12.05.2004", $aIcons) _AddRow($hListView, "CDE|555|12.05.2004", $aIcons) _AddRow($hListView, "CDE|555|12.05.2004", $aIcons) _AddRow($hListView, "CDE|555|12.05.2004", $aIcons) _AddRow($hListView, "CDE|555|12.05.2004", $aIcons) _AddRow($hListView, "CDE|555|12.05.2004", $aIcons) _AddRow($hListView, "CDE|555|12.05.2004", $aIcons) _AddRow($hListView, "CDE|555|12.05.2004", $aIcons) _AddRow($hListView, "CDE|555|12.05.2004", $aIcons) _AddRow($hListView, "CDE|555|12.05.2004", $aIcons) _AddRow($hListView, "CDE|555|12.05.2004", $aIcons) _AddRow($hListView, "CDE|555|12.05.2004", $aIcons) _AddRow($hListView, "CDE|555|12.05.2004", $aIcons) _AddRow($hListView, "CDE|555|12.05.2004", $aIcons) _AddRow($hListView, "CDE|555|12.05.2004", $aIcons) _AddRow($hListView, "CDE|555|12.05.2004", $aIcons) _AddRow($hListView, "CDE|555|12.05.2004", $aIcons) _AddRow($hListView, "CDE|555|12.05.2004", $aIcons) _AddRow($hListView, "CDE|555|12.05.2004", $aIcons) _AddRow($hListView, "CDE|555|12.05.2004", $aIcons) GUISetState() _GUICtrlListView_RegisterSortCallBack($hListView) EndFunc ;==>_Example1 Func sort() _GUICtrlListView_SortItems($hListView, GUICtrlGetState($hListView)) EndFunc ;==>sort Func _AddRow($hWnd, $sItem, $aIcons) Local $aItem = StringSplit($sItem, "|") Local $iIndex = _GUICtrlListView_AddItem($hWnd, $aItem[1], $aIcons[0], _GUICtrlListView_GetItemCount($hWnd) + 9999) _GUICtrlListView_SetColumnWidth($hWnd, 0, $LVSCW_AUTOSIZE_USEHEADER) For $x = 2 To $aItem[0] ;_GUICtrlListView_AddSubItem($hWnd, $iIndex, $aItem[$x], $x - 1, $aIcons[$x - 1] + $iPlus) _GUICtrlListView_AddSubItem($hWnd, $iIndex, $aItem[$x], $x - 1) _GUICtrlListView_SetColumnWidth($hWnd, $x - 1, $LVSCW_AUTOSIZE) Next EndFunc ;==>_AddRow Func CloseGUI() _GUICtrlListView_UnRegisterSortCallBack($hListView) GUIDelete() Exit EndFunc ;==>CloseGUI
×
×
  • Create New...