How can I align these elements?
header = VSplit(
children=[
Label("LEFT ",
dont_extend_width=True),
Label(" CENTER ",
dont_extend_width=True),
Label(" RIGHT RIGHT RIGHT RIGHT",
dont_extend_width=True),
],
padding=Dimension(weight=99),
padding_char="-",
align="CENTER",
)
CENTER is centered between LEFT and RIGHT, not centered on the container. And RIGHT is only on the right edge because of padding. If I remove the padding everything left-aligns with no gap.
There is probably something basic I'm missing here but I've been stalled on this for hours.
I found I could resolve this using
FloatContainer
with CENTER as its background element, and LEFT and RIGHT asFloat
s: