Jump to content
Slipk

Treeview Interface Problem

Recommended Posts

Hello everyone,

I need help with an interface problem over a treeview menu.

I have below a code, how when I disable the treeview to not appear the gray box around the text of the items? So change only the color of the text to gray not the background of the text?

 

Thank you!

#NoTrayIcon
#RequireAdmin
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <TreeViewConstants.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 409, 437, -1, -1)
$TreeView1 = GUICtrlCreateTreeView(0, 0, 289, 433)
GUICtrlSetState($TreeView1, $GUI_DISABLE)
$TreeView1_0 = GUICtrlCreateTreeViewItem("test", $TreeView1)
$TreeView1_1 = GUICtrlCreateTreeViewItem("subitem1", $TreeView1_0)
$TreeView1_2 = GUICtrlCreateTreeViewItem("test2", $TreeView1)
$Button1 = GUICtrlCreateButton("enable", 304, 16, 75, 25)
$Button2 = GUICtrlCreateButton("disable", 304, 48, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

        Case $Button1 ;enable
            GUICtrlSetState($TreeView1, $GUI_ENABLE)

        Case $Button2 ;disable
            GUICtrlSetState($TreeView1, $GUI_DISABLE)

    EndSwitch
WEnd

 

Share this post


Link to post
Share on other sites

Well,

that's very strange.

 

Got an error only in 4 lines of code.

Code line : $TreeView1 = GUICtrlCreateTreeView(0, 0, 289,  433)

Console output : $TreeView1 = GUICtrlCreateTreeView(0, 0, 289,ï

 

Never encountered something like this.

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

×
×
  • Create New...