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 

Vertical Slider and Buddies

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



Joined: 07 Feb 2005
Posts: 186
Location: Munich, Germany

PostPosted: Sun Mar 05, 2006 2:32 pm    Post subject: Vertical Slider and Buddies Reply with quote

It seems to be a bug. If I do this:
Code:
gui, add, Button, vM1, 100`%
gui, add, slider, h201 Range1-90 TickInterval10 ToolTip Center Vertical Buddy1M1 Buddy2M2
gui, add, Button, vM2, 0`%
gui, show
return

GuiEscape:
ExitApp


It seems that Buddy 2 is not aligned to the slider.

If I do that:
Code:
gui, add, Button, vM1, 100`%
gui, add, Button, vM2, 0`%
gui, add, slider, h201 Range1-90 TickInterval10 ToolTip Center Vertical Buddy1M1 Buddy2M2
gui, show
return

GuiEscape:
ExitApp


The Gui gets messed up, because the 2nd button that was initially at the top is drawn downwards by the Buddy. So at the top is a gap, at the bottom the Gui is too short.

Or am I wrong?
_________________
Peter

Wisenheiming for beginners: KaPeGe (German only, sorry)
Back to top
View user's profile Send private message Visit poster's website
corrupt



Joined: 29 Dec 2004
Posts: 2419

PostPosted: Sun Mar 05, 2006 7:04 pm    Post subject: Reply with quote

Buddy2 does not get assigned to the slider as M2 has not been created until the next line. If you create the second button before creating the slider it will draw the button on the form before drawing the slider and cause the slider to appear further down. There are a couple ways to solve this. You could either use absolute positions for the controls so that they stay where you put them and create the buttons before creating the slider or you can assign the buddy properties after creating the controls:

Code:
gui, add, Button, vM1, 100`%
gui, add, slider, h201 vsl1 Range1-90 TickInterval10 ToolTip Center Vertical
gui, add, Button, vM2, 0`%
GuiControl, +Buddy1M1 +Buddy2M2, sl1
gui, show
return

GuiEscape:
ExitApp
Back to top
View user's profile Send private message Visit poster's website
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Sun Mar 05, 2006 10:24 pm    Post subject: Reply with quote

As you've demonstrated, the slider-buddying process causes problems with relatively positioned controls. I'll look into it further. Thanks.
Back to top
View user's profile Send private message Send e-mail
kapege.de



Joined: 07 Feb 2005
Posts: 186
Location: Munich, Germany

PostPosted: Mon Mar 06, 2006 10:07 am    Post subject: Reply with quote

@ corrupt: Thanks for your workaround!

@ Chris: Thanks for updating!
_________________
Peter

Wisenheiming for beginners: KaPeGe (German only, sorry)
Back to top
View user's profile Send private message 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