Belini Posted November 8, 2018 Posted November 8, 2018 Is it possible to customize TreeView to display sub-items on the front instead of showing below the item? expandcollapse popup#include <GUIConstantsEx.au3> #include <GuiTreeView.au3> #include <GuiImageList.au3> #include <WindowsConstants.au3> _Main() Func _Main() Local $hItem, $hImage, $iImage, $hTreeView GUICreate("Teste TreeView", 400, 300) $hTreeView = GUICtrlCreateTreeView(2, 2, 396, 268, BitOR($TVS_HASLINES, $TVS_NOSCROLL), $WS_EX_CLIENTEDGE) GUISetState() $hImage = _GUIImageList_Create(16, 16, 5, 3) _GUIImageList_AddIcon($hImage, "shell32.dll", 110) _GUIImageList_AddIcon($hImage, "shell32.dll", 131) _GUIImageList_AddIcon($hImage, "shell32.dll", 165) _GUIImageList_AddIcon($hImage, "shell32.dll", 168) _GUIImageList_AddIcon($hImage, "shell32.dll", 137) _GUIImageList_AddIcon($hImage, "shell32.dll", 146) _GUICtrlTreeView_SetNormalImageList($hTreeView, $hImage) _GUICtrlTreeView_BeginUpdate($hTreeView) For $x = 1 To 3 $iImage = Random(0, 5, 1) $hItem = _GUICtrlTreeView_Add($hTreeView, 0, "New Item " & $x, $iImage, $iImage) For $y = 1 To 3 $iImage = Random(0, 5, 1) _GUICtrlTreeView_AddChild($hTreeView, $hItem, "New Child " & $y, $iImage, $iImage) Next Next _GUICtrlTreeView_EndUpdate($hTreeView) _GUICtrlTreeView_Expand($hTreeView) ; Loop until user exits Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>_Main My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ
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