bodil / vgtk

A declarative desktop UI framework for Rust built on GTK and Gtk-rs
http://bodil.lol/vgtk/
Other
1.05k stars 37 forks source link

Creating a Grid #62

Closed emirror-de closed 3 years ago

emirror-de commented 3 years ago

Hi there,

I am trying to create a 2x2 Grid. But I cannot find how I can configure the rows and columns for it.

I tried the following snippets, but all of them produced the same output, all labels are being rendered in the same location above each other:

<Grid>
    <Label label="Hello".to_string() />
    <Label label="World".to_string() />
    <Label label="Hello".to_string() />
    <Label label="World".to_string() />
</Grid>
<Grid orientation=Orientation::Horizontal>
    <Grid orientation=Orientation::Vertical>
        <Label label="Hello".to_string() />
        <Label label="World".to_string() />
    </Grid>
    <Grid orientation=Orientation::Vertical>
        <Label label="Hello".to_string() />
        <Label label="World".to_string() />
    </Grid>
</Grid>

How is it possible to create a fully working grid?

Thanks in advance and keep up the great work!

emirror-de commented 3 years ago

Hm ok I found it in the docs, I did not see the ext module in the documentation. Sorry for that!