Fantastic Posted April 18, 2010 Share Posted April 18, 2010 Can we have the style as shown on the picture below with AutoIt? The arrows which hide/show the grouped items. An example here: #include <GuiConstantsEx.au3> #include <GuiListView.au3> $Form2 = GUICreate("Example 2", 800, 600, -1, -1) $hListView = GUICtrlCreateListView("", 12, 12, 500, 500) ; Add columns _GUICtrlListView_InsertColumn($hListView, 0, "Column 1", 200) _GUICtrlListView_InsertColumn($hListView, 1, "Column 2", 100) _GUICtrlListView_EnableGroupView($hListView) For $i = 1 To 10 _GUICtrlListView_InsertGroup($hListView, -1, $i, $i) For $ii = 1 To 10 $idx = _GUICtrlListView_AddItem($hListView, $i) _GUICtrlListView_AddSubItem($hListView, $idx, $ii, 1) _GUICtrlListView_SetItemGroupID($hListView, $idx, $i) ConsoleWrite($i & @TAB & $ii & @CRLF) Next Next GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch Sleep(10) WEnd I had a topic for it in General Help and Support but I think it's more a GUI problem. [u]My current project:[/u] [size="1"]A bootable USB[/size]Webpage:*http://mylittlesoft.blogspot.com/ Link to comment Share on other sites More sharing options...
spudw2k Posted April 22, 2010 Share Posted April 22, 2010 (edited) Check out the _GUICtrlListView_SetGroupInfo() function. It supports setting a "collapsible" state to groups, but only supported on Vista or higher. I'm not sure if it creates the arrows you want, but it might be worth checking out.untested:Tested on Win2k8. Collapsible groups designated by plus/minus toggle.#include <GuiConstantsEx.au3> #include <GuiListView.au3> $Form2 = GUICreate("Example 2", 800, 600, -1, -1) $hListView = GUICtrlCreateListView("", 12, 12, 500, 500) ; Add columns _GUICtrlListView_InsertColumn($hListView, 0, "Column 1", 200) _GUICtrlListView_InsertColumn($hListView, 1, "Column 2", 100) _GUICtrlListView_EnableGroupView($hListView) For $i = 1 To 10 _GUICtrlListView_InsertGroup($hListView, -1, $i, $i) For $ii = 1 To 10 $idx = _GUICtrlListView_AddItem($hListView, $i) _GUICtrlListView_AddSubItem($hListView, $idx, $ii, 1) _GUICtrlListView_SetItemGroupID($hListView, $idx, $i) _GuiCtrlListView_SetGroupInfo($hListView,$i,$idx,0,$LVGS_COLLAPSIBLE) ConsoleWrite($i & @TAB & $ii & @CRLF) Next Next GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch Sleep(10) WEnd Edited April 22, 2010 by spudw2k Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
Fantastic Posted April 23, 2010 Author Share Posted April 23, 2010 Thanks spudw2k.It works great on Windows Vista/7 but not on XP.As per help file information this should work on XP_GUICtrlListView_SetGroupInfo Remarks Minimum OS - Windows XP. [u]My current project:[/u] [size="1"]A bootable USB[/size]Webpage:*http://mylittlesoft.blogspot.com/ Link to comment Share on other sites More sharing options...
spudw2k Posted April 27, 2010 Share Posted April 27, 2010 Yes, it's a little misleading. The function itself requires Windows XP+, but in order to use the $iState param of that func...you must have Vista or higher. Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF 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