mirror of
https://github.com/rivo/tview.git
synced 2024-11-17 03:26:09 +00:00
Merge pull request #190 from bcarlsson/fix-demo-example
Fixed example code in presentation demo textview
This commit is contained in:
commit
7bef21fe58
@ -10,6 +10,7 @@ import (
|
||||
)
|
||||
|
||||
const textView1 = `[green]func[white] [yellow]main[white]() {
|
||||
app := tview.[yellow]NewApplication[white]()
|
||||
textView := tview.[yellow]NewTextView[white]().
|
||||
[yellow]SetTextColor[white](tcell.ColorYellow).
|
||||
[yellow]SetScrollable[white](false).
|
||||
@ -24,8 +25,7 @@ const textView1 = `[green]func[white] [yellow]main[white]() {
|
||||
time.[yellow]Sleep[white]([red]200[white] * time.Millisecond)
|
||||
}
|
||||
}()
|
||||
tview.[yellow]NewApplication[white]().
|
||||
[yellow]SetRoot[white](textView, true).
|
||||
app.[yellow]SetRoot[white](textView, true).
|
||||
[yellow]Run[white]()
|
||||
}`
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user