-
Is there any way for one to push elements to both the left and right of a Row in iced? I have a row with 2 elements, one of which i want on the right of the window, and one on the left. There appears to be no documentation or examples on how to do something like this. |
Beta Was this translation helpful? Give feedback.
Answered by
yusdacra
Jan 7, 2021
Replies: 1 comment
-
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. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
hecrj
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can do:
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.