Jump to content
Sign in to follow this  
H. Itman

@TAB in TreeViewItem text

Recommended Posts

Hey All

I recently made af small program for backup purposes.

Now i found out that i needed to convert my ListView into a TreeView, no problem, except that @TABS does not display correctly.

In the ListView i used the $LBS_USETABSTOPS style to show @TABS, but i cant find a similar style for TreeView in the help file.

I have also searched this forum for almost 6 hours, and still nothing.

I tried everything i can possible think of, so i hope that some of you out there might have a solution for my problem.

In advance thanks.

SciTE version 1.68

AutoIt version



#include <GuiConstants.au3>

Opt("GUIOnEventMode", 1)


$GUI = GUICreate("TreeView",300,200,-1,-1)


$TVI = GUICtrlCreateTreeViewitem($Text,$TV_1)

$Btn = GUICtrlCreateButton("Exit",5,165,78,20)



While 1



Func Quit()





Share this post

Link to post
Share on other sites

Ok, first you dont really have a whole lot to go on here but I'm going to take a whak at it. I don't think you understand what @TAB is. It creates an actual ASCII tab character(9), not new menu items.

You define $Text as "My TAB -a tab char-> Test". So when you create a tree view item based on $Text, that's exactally what it will display! Each item in the tree view is an object (including the tree view itself), so you'll need to define each one.

Here's a little template below to help you get the flow of the tree view items.

You really need to study the AutoIt Help for GUICtrlCreateListView.

;- Incomplete Script -
$tree = GUICtrlCreateListView ( "text", left, top [, width [, height [, style [, exStyle]]]] ) <-- put in your values

$primary1 = GUICtrlCreateTreeViewItem( "Primary 1", $tree)
$item_p1_1 = GUICtrlCreateTreeViewItem( "Item 1", $primary1 )
$item_p1_2 = GUICtrlCreateTreeViewItem( "Item 2", $primary1 )
$item_p1_3 = GUICtrlCreateTreeViewItem( "Item 3", $primary1 )

$primary2 = GUICtrlCreateTreeViewItem( "Primary 2", $tree)
$item_p2_1 = GUICtrlCreateTreeViewItem( "Item 1", $primary2 )
$item_p2_2 = GUICtrlCreateTreeViewItem( "Item 2", $primary2 )

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...