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 

"gui, Tab, Name" after a "gui, Tab"

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



Joined: 31 Jan 2005
Posts: 3842
Location: Bremen, Germany

PostPosted: Tue May 15, 2007 11:49 pm    Post subject: "gui, Tab, Name" after a "gui, Tab" Reply with quote

see code
Code:
Gui, 1:Add, Tab, ,Tab1|tab2|test
Gui, 1:Tab

;some code

gui, 1:Tab, 1        ;<= this works
; gui, 1:Tab, Tab1   ;<= this doesn't work
    Gui, 1:Add, Button, Section  ,Test
Gui, 1:Tab

Gui, 1:Show
Return

GuiClose:
    ExitApp

_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
engunneer



Joined: 30 Aug 2005
Posts: 6772
Location: Pacific Northwest, US

PostPosted: Wed May 16, 2007 4:51 am    Post subject: Reply with quote

reported error is that the tab doesn't exist yet. the following code does work, though

Code:

Gui, 1:Add, Tab, ,Tab1|tab2|test
;Gui, 1:Tab        ;<== removed this

;some code

;gui, 1:Tab, 1        ;<= this works
gui, 1:Tab, Tab1   ;<== this works now too
    Gui, 1:Add, Button, Section  ,Test
Gui, 1:Tab

Gui, 1:Show
Return

GuiClose:
    ExitApp


I think it has something to do with this note in the documentation, but I don't see why it's broken
Quote:

It is also possible to use any of the examples above to assign controls to a tab or tab-control that does not yet exist (except in the case of the Name method).


BTW: I'm on version 1.0.46.10
_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM
Back to top
View user's profile Send private message Visit poster's website
toralf



Joined: 31 Jan 2005
Posts: 3842
Location: Bremen, Germany

PostPosted: Wed May 16, 2007 6:22 am    Post subject: Reply with quote

Sorry for the short post.
I was in a hury and wanted to get the bug out into the wild.

engunneer described it correctly, except the quote from the manual, to my understanding. The code also doesn't work, if the "Gui,Show" is directly after the "Gui,Add,Tab" thus the tab control exists when controls get added.

But thanks for looking ito it. I also use AHK 1.0.46.10
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Wed May 16, 2007 3:03 pm    Post subject: Reply with quote

This will be fixed in the next update. Until then, another way to work around it is by specifying the number of the tab control:
Code:
gui, 1:Tab, Tab1, 1
Thanks.
Back to top
View user's profile Send private message Send e-mail
toralf



Joined: 31 Jan 2005
Posts: 3842
Location: Bremen, Germany

PostPosted: Thu May 31, 2007 12:10 pm    Post subject: Reply with quote

It is fixed in 1.0.46.16
Thanks
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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