diff options
Diffstat (limited to 'dropdown.go')
| -rw-r--r-- | dropdown.go | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/dropdown.go b/dropdown.go index 839f663..9832874 100644 --- a/dropdown.go +++ b/dropdown.go @@ -48,10 +48,15 @@ func makeDropdownView(ddItems string) *guiWidget { return tk } -func addDropdown() *tree.Node { +func addDropdownTK(wId int) *guiWidget { + n := addDropdownNew(wId) + return n.TK.(*guiWidget) +} + +func addDropdownNew(wId int) *tree.Node { n := new(tree.Node) n.WidgetType = widget.Flag - n.WidgetId = -222 + n.WidgetId = wId n.ParentId = 0 // store the internal toolkit information @@ -64,7 +69,7 @@ func addDropdown() *tree.Node { tk.node.State.Label = "DropBox" // set the name used by gocui to the id - tk.cuiName = "-1 DR" + tk.cuiName = fmt.Sprintf("%d DR", wId) tk.color = &colorFlag |
