Post by rcfjr on Jan 11, 2022 6:29:31 GMT
When laying out widow buttons, that requires exact placement, they are not aligned with each other. I have attached a short program to illustrate the issue. When run:
Here is an example code to show the issue. Resize the window to bring example corner buttons together:
'window alignment test
nomainwin
WindowWidth = 300
WindowHeight = 300
UpperLeftX = 500
UpperLeftY = 200
button #test.ok1, "UR", [clicked], UR, 0, 0, 28, 28
button #test.ok2, "UR", [clicked], UR, 30, 0, 28, 28
button #test.ok3, "UR", [clicked], UR, 0, 30, 28, 28
button #test.ok4, "LR", [clicked], LR, 0, 0, 28, 28
button #test.ok5, "LR", [clicked], LR, 30, 0, 28, 28
button #test.ok6, "LR", [clicked], LR, 0, 30, 28, 28
button #test.ok7, "UL", [clicked], UL, 0, 0, 28, 28
button #test.ok8, "UL", [clicked], UL, 30, 0, 28, 28
button #test.ok9, "UL", [clicked], UL, 0, 30, 28, 28
button #test.ok10, "LL", [clicked], LL, 0, 0, 28, 28
button #test.ok11, "LL", [clicked], LL, 30, 0, 28, 28
button #test.ok12, "LL", [clicked], LL, 0, 30, 28, 28
button #test.ok13, "OO", [clicked], UR, 30, 30, 28, 28
button #test.ok14, "OO", [clicked], UR, 60, 30, 28, 28
button #test.ok15, "OO", [clicked], UR, 30, 60, 28, 28
button #test.ok16, "OO", [clicked], LR, 30, 30, 28, 28
button #test.ok17, "OO", [clicked], LR, 60, 30, 28, 28
button #test.ok18, "OO", [clicked], LR, 30, 60, 28, 28
button #test.ok13, "OO", [clicked], UL, 30, 60, 28, 28
button #test.ok14, "OO", [clicked], UL, 30, 30, 28, 28
button #test.ok15, "OO", [clicked], UL, 60, 30, 28, 28
button #test.ok16, "OO", [clicked], LL, 30, 30, 28, 28
button #test.ok17, "OO", [clicked], LL, 60, 30, 28, 28
button #test.ok18, "OO", [clicked], LL, 30, 60, 28, 28
open "Alignment Test Window!" for window as #test
wait
[clicked]
close #test
end
- UR buttons do not align with UR buttons
- UR buttons do not align with LR buttons
- LR buttons do not align with LL buttons
- LL buttons cannot reference Lower-Left corner
- UL buttons do not align with each other
Here is an example code to show the issue. Resize the window to bring example corner buttons together:
'window alignment test
nomainwin
WindowWidth = 300
WindowHeight = 300
UpperLeftX = 500
UpperLeftY = 200
button #test.ok1, "UR", [clicked], UR, 0, 0, 28, 28
button #test.ok2, "UR", [clicked], UR, 30, 0, 28, 28
button #test.ok3, "UR", [clicked], UR, 0, 30, 28, 28
button #test.ok4, "LR", [clicked], LR, 0, 0, 28, 28
button #test.ok5, "LR", [clicked], LR, 30, 0, 28, 28
button #test.ok6, "LR", [clicked], LR, 0, 30, 28, 28
button #test.ok7, "UL", [clicked], UL, 0, 0, 28, 28
button #test.ok8, "UL", [clicked], UL, 30, 0, 28, 28
button #test.ok9, "UL", [clicked], UL, 0, 30, 28, 28
button #test.ok10, "LL", [clicked], LL, 0, 0, 28, 28
button #test.ok11, "LL", [clicked], LL, 30, 0, 28, 28
button #test.ok12, "LL", [clicked], LL, 0, 30, 28, 28
button #test.ok13, "OO", [clicked], UR, 30, 30, 28, 28
button #test.ok14, "OO", [clicked], UR, 60, 30, 28, 28
button #test.ok15, "OO", [clicked], UR, 30, 60, 28, 28
button #test.ok16, "OO", [clicked], LR, 30, 30, 28, 28
button #test.ok17, "OO", [clicked], LR, 60, 30, 28, 28
button #test.ok18, "OO", [clicked], LR, 30, 60, 28, 28
button #test.ok13, "OO", [clicked], UL, 30, 60, 28, 28
button #test.ok14, "OO", [clicked], UL, 30, 30, 28, 28
button #test.ok15, "OO", [clicked], UL, 60, 30, 28, 28
button #test.ok16, "OO", [clicked], LL, 30, 30, 28, 28
button #test.ok17, "OO", [clicked], LL, 60, 30, 28, 28
button #test.ok18, "OO", [clicked], LL, 30, 60, 28, 28
open "Alignment Test Window!" for window as #test
wait
[clicked]
close #test
end