I am sort of having problems with setting components at opposite ends in an Horizontal Layout . Say a button on the left and a NativeSelect on the right.
Tried to use GridLayout and span the select over two rows. didn’t work. ExpandRatio can’t be used either.
I believe that a HorizontalLayout doesn’t default to full width, so elements are just added next to each other by default and do not spread out across the full width.
If you sent your layout to 100%, it probably will work:
hlay.setWidth(100,UNITS_PERCENTAGE);
You may not need the expand ratios for just two fields on each end if you make the first left and the second right aligned (not sure why your “left” one is set to centered), but I do something similar and do use expand ratios because I want the first few items in my layout to remain together towards the left end, while only one button appears at the right end. In that case, I give the right end full expand ratio: