diff --git a/demos/presentation/form.go b/demos/presentation/form.go index f2b0c0f..5a8c041 100644 --- a/demos/presentation/form.go +++ b/demos/presentation/form.go @@ -21,6 +21,7 @@ const form = `[green]package[white] main }, [red]0[white], nil). [yellow]AddCheckbox[white]([red]"On vacation:"[white], false, nil). [yellow]AddPasswordField[white]([red]"Password:"[white], [red]""[white], [red]10[white], [red]'*'[white], nil). + [yellow]AddTextArea[white]([red]"Notes:"[white], [red]""[white], [red]0[white], [red]5[white], [red]0[white], nil). [yellow]AddButton[white]([red]"Save"[white], [yellow]func[white]() { [blue]/* Save data */[white] }). [yellow]AddButton[white]([red]"Cancel"[white], [yellow]func[white]() { [blue]/* Cancel */[white] }) tview.[yellow]NewApplication[white](). @@ -36,8 +37,9 @@ func Form(nextSlide func()) (title string, content tview.Primitive) { AddDropDown("Role:", []string{"Engineer", "Manager", "Administration"}, 0, nil). AddCheckbox("On vacation:", false, nil). AddPasswordField("Password:", "", 10, '*', nil). + AddTextArea("Notes:", "", 0, 5, 0, nil). AddButton("Save", nextSlide). AddButton("Cancel", nextSlide) f.SetBorder(true).SetTitle("Employee Information") - return "Forms", Code(f, 36, 15, form) + return "Forms", Code(f, 36, 21, form) } diff --git a/table.go b/table.go index 5797498..07c910a 100644 --- a/table.go +++ b/table.go @@ -1137,7 +1137,7 @@ func (t *Table) Draw(screen tcell.Screen) { break // No space for the text anymore. } drawBorder(columnX-1, rowY, Borders.Vertical) - } else if column < columnCount-1 { + } else if columnIndex < len(columns)-1 { // Draw separator. drawBorder(columnX+columnWidth, rowY, t.separator) } diff --git a/tview.gif b/tview.gif index 0583d7b..9875054 100644 Binary files a/tview.gif and b/tview.gif differ