myscript
Joined: 05 Jul 2007 Posts: 11
|
Posted: Sun May 11, 2008 9:53 pm Post subject: Options for TreeView |
|
|
The tutorial:
| Quote: | | The Options parameter is a string containing zero or more words from the list below (not case sensitive). Separate each word from the next with a space or tab. To remove an option, precede it with a minus sign. To add an option, a plus sign is permitted but not required |
I have this line of code:
| Code: | ImageListID := IL_Create(140)
Loop 140 ; Load the ImageList with some standard system icons.
IL_Add(ImageListID, "shell32.dll", A_Index)
Gui, default
Gui, Add, TreeView, AltSubmit ImageList%ImageListID% r20
P1 := TV_Add("First parent", 0, "Icon22")
P1C1 := TV_Add("Parent 1's first childaaaaaa", P1, "Icon22")
TV_Add("Second parent")
P2C1 := TV_Add("Parent 2's first child", P2, "Icon22")
P2C2 := TV_Add("Parent 2's second child", P2, "Icon22")
P2C2C1 := TV_Add("Child 2's first child", P2C2, "Icon22")
Gui, Show ; Show the window and its TreeView.
Return
GuiClose:
ExitApp
Return |
In this instance,it work properly but if i want to expand the icon i add the word "Expand" with a space between the options like this:
| Code: | ImageListID := IL_Create(140)
Loop 140 ; Load the ImageList with some standard system icons.
IL_Add(ImageListID, "shell32.dll", A_Index)
Gui, default
Gui, Add, TreeView, AltSubmit ImageList%ImageListID% r20
P1 := TV_Add("First parent", 0, "Icon22" "Expand")
P1C1 := TV_Add("Parent 1's first childaaaaaa", P1, "Icon22")
TV_Add("Second parent")
P2C1 := TV_Add("Parent 2's first child", P2, "Icon22")
P2C2 := TV_Add("Parent 2's second child", P2, "Icon22")
P2C2C1 := TV_Add("Child 2's first child", P2C2, "Icon22")
Gui, Show ; Show the window and its TreeView.
Return |
The item don't expand.
It's a bug or i mistake something ?
 |
|
Lexikos
Joined: 17 Oct 2006 Posts: 2364 Location: Australia, Qld
|
Posted: Mon May 12, 2008 9:31 am Post subject: |
|
|
| To "expand" on what n-l-i-d posted, the expression "Icon22" "Expand" is equivalent to "Icon22" . "Expand" -- it concatenates the two literal strings, resulting in "Icon22Expand". |
|