Home > Software engineering >  Go Fyne Disable HSplit Resize?
Go Fyne Disable HSplit Resize?

Time:06-12

How do I disable or prevent the split pane to be resizable?

hSplit := container.NewHSplit(
    hello,
    widget.NewButton("Hi!", func() {
        hello.SetText("Welcome :)")
    }),
)

enter image description here

I am trying to have a label followed by the NewList widget. However, I have tried a bunch of layouts for this e.g NewVBoxLayout but as per the doc, all elements in this will be set to the min height. Hence the list becomes extremely small. I am unable to do this using container.

I have tried NewMaxLayout as well, but the list now overlaps with the Select Item label

CodePudding user response:

Not at this time - split pane is a user interface control to support resizing either side. It sounds like you want to do something else. What are you aiming to do exactly? If it's just laying things out then try other containers which don't offer this feature.

CodePudding user response:

Usually when you want 1 item to fill space and others to arrange around it you’d use Border. Note that containers inside containers with different layouts is the way we build more complex arrangements such as you illustrate above.

  • Related