How to make all items in vbox to have same xsize?
Posted: Tue Aug 23, 2016 11:16 am
I have a vbox, which has a vpgrid. That grid manages own width just fine and I do not want to set it explicitely. After it I have viewport which uses another screen, containing ton of text, so, if I do not set width explicitely, it will atempt to fill rest of the screen.
I want second viewport to have the same width as first one. I could find exact width by trial and error, but I expect size of first vpgrid to change during development and maybe even ingame, so hardcoding width(s) is not something I want to do.
So, is there any way to get width of previous item or solve this problem in some other way?
Fragment of screen code (with almost-correct width set manually):
I want second viewport to have the same width as first one. I could find exact width by trial and error, but I expect size of first vpgrid to change during development and maybe even ingame, so hardcoding width(s) is not something I want to do.
So, is there any way to get width of previous item or solve this problem in some other way?
Fragment of screen code (with almost-correct width set manually):
Code: Select all
vbox:
spacing 8
vpgrid:
ysize 500
cols 4
spacing 4
mousewheel True
scrollbars "vertical"
for item in items:
textbutton "{size=14}Button{/size}":
xysize (96, 96)
action Return()
viewport:
mousewheel True
scrollbars "vertical"
xsize 400
use item_info