forked from tslocum/cview
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
367 B
14 lines
367 B
// Demo code for the DropDown primitive. |
|
package main |
|
|
|
import "git.sr.ht/~tslocum/cview" |
|
|
|
func main() { |
|
app := cview.NewApplication() |
|
dropdown := cview.NewDropDown(). |
|
SetLabel("Select an option (hit Enter): "). |
|
SetOptions([]string{"First", "Second", "Third", "Fourth", "Fifth"}, nil) |
|
if err := app.SetRoot(dropdown, true).Run(); err != nil { |
|
panic(err) |
|
} |
|
}
|
|
|