From a5b3a934d2a2355ce2487f5b3ce52dff2f8a9047 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 2 Feb 2025 23:36:33 -0600 Subject: finally can drag something else --- dropdown.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'dropdown.go') 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 -- cgit v1.2.3