Skip to content
Discussion options

You must be logged in to vote

You can use the width and height properties of the window to make it fix, and the preferred-width / preferred-height properties of a layout to know the size it would have.

So I think you want something like this:

export component Demo {
    height: layout.preferred-height;
    width: layout.preferred-width;
    layout := VerticalBox {
        Text { text: "Hello World!"; }
        TextEdit { }
        Button { text: "Ok"; }
    }
}

demo

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by peterjc123
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