faustf

questions about _GUICtrlTreeView_SetTextColor

3 posts in this topic

#1 ·  Posted

hi guy

is  possible for example set  different color   for item and  for child of item???

#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

Share this post


Link to post
Share on other sites



#2 ·  Posted

Yes. Do a forum search there are many examples.

 

Saludos

Share this post


Link to post
Share on other sites

#3 ·  Posted

Check this post.

 


Kind Regards
Skeletor

"I need coffee to turn me back to a normal human"

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now