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 

Using GuiSize with two windows

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
zipzulu



Joined: 14 May 2005
Posts: 3

PostPosted: Sat May 14, 2005 4:41 pm    Post subject: Using GuiSize with two windows Reply with quote

Hi there,

don't know what I'm doing wrong here but is there a way to use GuiSize/A_GuiHeight/A_GuiWidth even with two different GUI windows?
To be more specific: I've got a main and an output window. Upon resizing the output window its controls should be adjusted accordingly - however, the controls get updated when I resize the main window ...

Example:

Code:

Gui, +Resize
Gui, 1:Show, x0 y0 h250 w250, Main

Gui, 2: +Resize
Gui, 2:Show, x400 y0 h250 w250, Output
Gui, 2:Add, Edit, vOutputEdit

GuiSize:
Width := A_GuiWidth - 20
Height := A_GuiHeight - 20
GuiControl, 2:Move, OutputEdit, W%Width% H%Height%
return

GuiClose:
ExitApp


Thanks
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Sat May 14, 2005 9:26 pm    Post subject: Reply with quote

I think all you need is a 2 in front of the word GuiSize: "2GuiSize:".

The "2" prefix allows a each window to have its own label (though window #1 would does not have a prefix at all).
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help 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