Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] How to build a tree from bottom up ? #3

Open
kivimango opened this issue Dec 1, 2021 · 0 comments
Open

[Question] How to build a tree from bottom up ? #3

kivimango opened this issue Dec 1, 2021 · 0 comments

Comments

@kivimango
Copy link

Hello ! i stuck with a problem: i cant build a tree from bottom up.
Consider the following scenario: (i would like to store GUI widgets parent-children relationships using this lib)

Window()::new()
    .child(
            Center::new(
                .child(
                    Text::new("Sample text").build()
                )
                .child(
                    Text::new("Sample text 2").build()
                )
                .build()
     .build()

My problem is to append children to their parent in the build() method, i need the parent's index.But the parent is not built yet, hence its index is not exists.
How to solve this problem ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant