diff options
| author | Jeff Carr <[email protected]> | 2025-02-02 23:36:33 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-02-02 23:36:33 -0600 |
| commit | a5b3a934d2a2355ce2487f5b3ce52dff2f8a9047 (patch) | |
| tree | 0ba579ff5665f5906f72ce965ce593df6e581edb /dropdown.go | |
| parent | 517d844b3c8257dd796244e6a151deceabedab42 (diff) | |
finally can drag something else
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 |
