AutoHotkey Community

It is currently May 27th, 2012, 8:25 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: March 5th, 2006, 2:32 pm 
Offline

Joined: February 7th, 2005, 11:11 am
Posts: 192
Location: Munich, Germany
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)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 5th, 2006, 7:04 pm 
Offline
User avatar

Joined: December 29th, 2004, 1:28 pm
Posts: 2545
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 5th, 2006, 10:24 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
As you've demonstrated, the slider-buddying process causes problems with relatively positioned controls. I'll look into it further. Thanks.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 6th, 2006, 10:07 am 
Offline

Joined: February 7th, 2005, 11:11 am
Posts: 192
Location: Munich, Germany
@ corrupt: Thanks for your workaround!

@ Chris: Thanks for updating!

_________________
Peter

Wisenheiming for beginners: KaPeGe (German only, sorry)


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group