I have a script in which tool bar icons are collected. Since the user may arrange more than 15 on his tool tool bar, I need a method to show those with nr > 15 'wrapped around' to avoid a GUI of excessive width. This screenshot just shows a collection of 3, but ...
![Image](https://daube.ch/zz_tests/buildTB.png)
I tried to overlay the additonal icons/texts by restarting the x coordinate. but this does not work. Hence I made a test program just using the text portion of the problem':
Code: Select all
; OverlayGuiItems.ahk
Gui AA:Add, Text , x020 y010 w30 h020 , 1
Gui AA:Add, Text , x050 y010 w30 h020 , 2
Gui AA:Add, Text , x080 y010 w30 h020 , 3
Gui AA:Add, Text , x020 y010 w30 h020 , 4
Gui AA:Add, Text , x050 y010 w30 h020 , 5
Gui AA:Show , h070 w200, With static coordinates the overly works
jNew := 0
w := 20
Loop 5{
If (Mod(jNew, 3) == 0) {
newBtnX := 20 - w
}
jNew += 1 ; number of new button
newBtnX += w ; increment location
; Gui BB:Add, Text , x%newBtnX%+20 y050 w%w% h020 , %jNew%
; }
; Gui BB:Show , h070 w200, Separate GUI with dynamic coordinates OK
Gui AA:Add, Text , x%newBtnX%+20 y050 w%w% h020 , %jNew%
}
Gui AA:Show , h070 w200, Same GUI with dynamic coordinates NOT OK
MsgBox What's going on?
ExitApp
![Image](https://daube.ch/zz_tests/buildTB-separteGUI.png)
But running the code as it is active in the above snippet (only one GUI exists) does not show the wrapped items
![Image](https://daube.ch/zz_tests/buildTB-sameGUI.png)
How can I make this to work as expected?