faustf Posted July 18, 2017 Share Posted July 18, 2017 hi guy is possible for example set different color for item and for child of item??? expandcollapse popup#include <GUIConstantsEx.au3> #include <GuiImageList.au3> #include <GuiTreeView.au3> #include <MsgBoxConstants.au3> #include <WindowsConstants.au3> Global Const $COLOR_Turquoise = 0x40e0d0 Global Const $COLOR_Crimson = 0x000000 Example() Func Example() Local $hImage, $idTreeView Local $iStyle = BitOR($TVS_EDITLABELS, $TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS, $TVS_CHECKBOXES) GUICreate("TreeView Set Text Color", 400, 300) $idTreeView = GUICtrlCreateTreeView(2, 2, 396, 268, $iStyle, $WS_EX_CLIENTEDGE) GUISetState(@SW_SHOW) _GUICtrlTreeView_SetTextColor($idTreeView, $COLOR_Crimson) _GUICtrlTreeView_SetLineColor($idTreeView, $COLOR_WHITE) _GUICtrlTreeView_BeginUpdate($idTreeView) Local $de=_GUICtrlTreeView_Add($idTreeView, 0,"test") _GUICtrlTreeView_SetTextColor($idTreeView, 0x00c000) _GUICtrlTreeView_AddChild($idTreeView,$de,"demade") _GUICtrlTreeView_EndUpdate($idTreeView) ; Loop until the user exits. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>Example thankz at all Link to comment Share on other sites More sharing options...
Danyfirex Posted July 19, 2017 Share Posted July 19, 2017 Yes. Do a forum search there are many examples. Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
Skeletor Posted July 19, 2017 Share Posted July 19, 2017 Check this post. Kind RegardsSkeletor "Coffee: my defense against going postal." Microsoft Office Splash Screen | Basic Notepad Program (Beginner) | Transparent Splash Screen | Full Screen UI Link to comment Share on other sites More sharing options...
Belini Posted November 23, 2018 Share Posted November 23, 2018 (edited) @faustf I also want to share my solution. expandcollapse popup#include <GUIConstantsEx.au3> #include <GuiImageList.au3> #include <GuiTreeView.au3> #include <MsgBoxConstants.au3> #include <WindowsConstants.au3> Example() Func Example() Local $hImage, $idTreeView, $de[11] Local $iStyle = BitOR($TVS_EDITLABELS, $TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS, $TVS_CHECKBOXES) GUICreate("TreeView Set Text Color", 400, 300) $idTreeView = GUICtrlCreateTreeView(2, 2, 396, 268, $iStyle, $WS_EX_CLIENTEDGE) GUISetState(@SW_SHOW) _GUICtrlTreeView_BeginUpdate($idTreeView) For $i = 1 To 10 $de[$i] = GUICtrlCreateTreeViewItem("TEST: " & $i, $idTreeView) If Mod($i, 2) = 0 Then GUICtrlSetColor(-1, $COLOR_RED) Else GUICtrlSetColor(-1, $COLOR_BLUE) EndIf Next For $i = 1 To 5 $select = Random(1, 10, 1) _GUICtrlTreeView_SelectItem($idTreeView, $de[$select]); selecionar item $select = _GUICtrlTreeView_GetSelection($idTreeView) _GUICtrlTreeView_AddChild($idTreeView, $select, "demade " & $i, -1, -1) _GUICtrlTreeView_SetTextColor($idTreeView, $COLOR_lime) Next _GUICtrlTreeView_EndUpdate($idTreeView) _GUICtrlTreeView_Expand($idTreeView) ; Loop until the user exits. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>Example Edited November 23, 2018 by Belini 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 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