Skip to content

Position an item #609

Closed Answered by M-Adoo
Maikel1963 asked this question in Q&A
Discussion options

You must be logged in to vote

You can just try

fn_widget!{
  @Text {
         h_align:  HAlign::Center,
         v_align:  VAlign::Center,
         text: "Hello World!",        
   }
}

Because align_items and justify_content are configured to place its children in the center of the Flex, but you don't provide a container for the Flex, so it is extended by its children. h_align and v_align are used to configure how the widget is placed in its parent, where Flex's parent is the window

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Maikel1963
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants