gabdube / native-windows-gui

A light windows GUI toolkit for rust
https://gabdube.github.io/native-windows-gui/
MIT License
1.93k stars 125 forks source link

Alignment in GridLayout #276

Open christian-intra2net opened 11 months ago

christian-intra2net commented 11 months ago

Hi, thanks a lot for native-windows-gui, it's great to produce such simple lightweight GUIs in Rust.

I have one issue I failed to solve after reading documentation, examples and source code: how can I define in a GridLayout where a certain element should be inside it's "grid cell" if it does not fill it completely? This is not an issue for e.g. buttons or labels, because they just adjust their size to fill up their grid cell, so defining the alignment of the text they contain is enough in almost all cases. But when I add a checkbox (with empty and thus invisible label), this will position the check box as far left as possible inside its grid cell (probably leaving as much space for the empty label as possible).

Is there a way to do this with native-windows-gui? Did I overlook something?