Horizental Layout

Hi,
In horizontal layout I need two buttons to float to the left leaving any empty space to their right and have no space between each other, how can this be done?

Hi,

If I got your question correctly - you shouldn’t set any sizes for your buttons, set their alignments in layout to the left, and set the expand ratio of the second button to 1f.

best regards,
sasha

Doesn’t that mean that button with expand set to 1 will expand to fill all the remaining space?

Hi,

Actually, no. The components inside the Vertical/Horizontal layouts are rendered inside a special containers. Setting the expand ratio of one component to 1f you actually force it’s container to consume all the free space. The component itself will not be stretched. In case you do not set the expand ratio - the render space is shared between the component containers evenly.

best regards,
sasha