The header is one line Table created like this:
header := tui.NewTable(0, 0)
header.SetColumnStretch(0, 1)
header.SetColumnStretch(1, 4)
header.SetColumnStretch(2, 4)
header.SetColumnStretch(3, 4)
labelID := tui.NewLabel("ID")
labelNT := tui.NewLabel("Notebook Title")
labelT := tui.NewLabel("Note Title")
labelTags := tui.NewLabel("Tags")
Under the header there is a table created similar to header:
notesInfoList := tui.NewTable(0, 0)
notesInfoList.SetColumnStretch(0, 1)
notesInfoList.SetColumnStretch(1, 4)
notesInfoList.SetColumnStretch(2, 4)
notesInfoList.SetColumnStretch(3, 4)
notesInfoList.SetFocused(true)
for _, note := range jNotes {
notesInfoList.AppendRow(
//Note ID
tui.NewLabel(strconv.Itoa(int(note.ID))),
//Notebook title
tui.NewLabel(note.NotebookTitle),
//Note title
tui.NewLabel(note.Title),
//Note tags
tui.NewLabel(note.Tags),
)
}
Everthything is aligned until I put the notesInfoList in a ScrollArea, what I do is:
scrollNotesInfo := tui.NewScrollArea(notesInfoList)
root := tui.NewVBox(header, scrollNotesInfo, mainPart, footer)
ui, err := tui.New(root)
if err != nil {
log.Fatal(err)
}
Then the scrollable area shrinks to the left
With scrollable :

Without scrollable :

Any ideas why this is happening?
The header is one line Table created like this:
Under the header there is a table created similar to header:
Everthything is aligned until I put the notesInfoList in a ScrollArea, what I do is:
Then the scrollable area shrinks to the left
With scrollable :

Without scrollable :
Any ideas why this is happening?