AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Options for TreeView

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
myscript



Joined: 05 Jul 2007
Posts: 11

PostPosted: Sun May 11, 2008 9:53 pm    Post subject: Options for TreeView Reply with quote

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 ?

Rolling Eyes
Back to top
View user's profile Send private message
n-l-i-d
Guest





PostPosted: Sun May 11, 2008 10:42 pm    Post subject: Reply with quote

"Icon22" "Expand" should be "Icon22 Expand"
Back to top
Lexikos



Joined: 17 Oct 2006
Posts: 2364
Location: Australia, Qld

PostPosted: Mon May 12, 2008 9:31 am    Post subject: Reply with quote

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".
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group