 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
kapege.de
Joined: 07 Feb 2005 Posts: 186 Location: Munich, Germany
|
Posted: Sun Mar 05, 2006 2:32 pm Post subject: Vertical Slider and Buddies |
|
|
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 |
|
 |
corrupt
Joined: 29 Dec 2004 Posts: 2393
|
Posted: Sun Mar 05, 2006 7:04 pm Post subject: |
|
|
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 |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Sun Mar 05, 2006 10:24 pm Post subject: |
|
|
| As you've demonstrated, the slider-buddying process causes problems with relatively positioned controls. I'll look into it further. Thanks. |
|
| Back to top |
|
 |
kapege.de
Joined: 07 Feb 2005 Posts: 186 Location: Munich, Germany
|
Posted: Mon Mar 06, 2006 10:07 am Post subject: |
|
|
@ corrupt: Thanks for your workaround!
@ Chris: Thanks for updating! _________________ Peter
Wisenheiming for beginners: KaPeGe (German only, sorry) |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|