gpt4 book ai didi

go - 如何拉伸(stretch)条目小部件

转载 作者:行者123 更新时间:2023-12-01 20:25:50 24 4
gpt4 key购买 nike

我对小部件的正确布局有疑问。
我有什么:
enter image description here
我要什么:
enter image description here
代码:

  grid := fyne.NewContainerWithLayout(layout.NewGridLayout(5), newSpacer, newSpacer, newSpacer, topRSpace, topC)

// Group of files and dirs buttons
fileBox := widget.NewVBox(files...)
dirBox := widget.NewVBox(dirs...)

entryDisabled := widget.NewMultiLineEntry()
entryDisabled.SetText("Disabled")
entryDisabled.Disable()
entryBox := widget.NewVBox(entryDisabled)

group := widget.NewGroup(so.GetPath(),dirBox, fileBox)

container1 := fyne.NewContainerWithLayout(layout.NewBorderLayout(group, nil, nil, nil), group, entryBox)

group2 := widget.NewVScrollContainer(container1)

container2 := fyne.NewContainerWithLayout(layout.NewBorderLayout(grid, nil, nil, nil), grid, group2)
mainWindow.SetContent(container2)

最佳答案

我想通了。 entryDisabled 周围的 NewVBox 需要被移除。

关于go - 如何拉伸(stretch)条目小部件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63615390/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com