Skip to content

Example on how to do right and left justification on rows #1207

Answered by yusdacra
rnd-ash asked this question in Q&A
Discussion options

You must be logged in to vote

You can do:

let row = Row::with_children(vec![
	left_element.into(),
	Space::with_width(Length::Fill),
	right_element.into(),
]);

which should do the trick.

You can adjust the width etc. however you want of course. For example you may want the elements to take 1 portion and the space to take 2 portion of available width always.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by hecrj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants
Converted from issue

This discussion was converted from issue #687 on January 20, 2022 07:25.