Home > front end >  How to make a grid / Fyne / Golang
How to make a grid / Fyne / Golang

Time:03-08

I'm making an application with Fyne.
I need to create a grid where the left column will be fixed and the right column will stretch. In general, there will be a menu on the left, and the main block on the right (a screenshot of the expected one below).
I read the documentation screen shot op the app

if you explore their demo on your go path source you can see the full function of (makeNav) that will make things clickable.

and to make (the left column will be fixed and the right column will stretch):

split.Offset = 0

CodePudding user response:

It sounds like you are making a Border layout (something attached to one edge). If so then you can set the left to be minimum size and the content stretch to fill by doing:

container.NewBorder(nil, nil, left, nil, content)

(the parameters are top, bottom, left, right, middle). If you want the user to control the split then do as suggested elsewhere and user container.NewHSplit(left, right).

  • Related