diff options
| author | Jeff Carr <[email protected]> | 2025-03-04 14:33:39 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-03-04 14:33:39 -0600 |
| commit | a88937c508d2921aa5e6fa335450ee8f05e7fbf9 (patch) | |
| tree | f3129c304e6509c8ec7fceef66238f97f337ddd0 /table.go | |
| parent | 96eac58cf59d2c735cd2b88e4458fff12422e121 (diff) | |
working on delete table
Diffstat (limited to 'table.go')
| -rw-r--r-- | table.go | 22 |
1 files changed, 13 insertions, 9 deletions
@@ -13,7 +13,8 @@ import ( "go.wit.com/widget" ) -func initWindowPB(pb *guipb.Widget) *guiWidget { +/* +func initGridPB(pb *guipb.Widget) *guiWidget { var w *guiWidget w = new(guiWidget) @@ -24,6 +25,7 @@ func initWindowPB(pb *guipb.Widget) *guiWidget { w.labelN = pb.Name return w } +*/ func initGridPB(pb *guipb.Widget) *guiWidget { var w *guiWidget @@ -42,19 +44,21 @@ func showTable(t *guipb.Table) { return } log.Info("gocui: table.Title", t.Title) - if t.Window == nil { - log.Info("gocui: missing window widget. tree plugin error") - return - } - log.Info("gocui: need to add window here id =", t.Window.Id, t.Window.Name) + // log.Info("gocui: need to add window here id =", t.Window.Id, t.Window.Name) if t.Grid == nil { log.Info("gocui: missing grid widget. tree plugin error") return } + root := me.treeRoot.TK.(*guiWidget) + parent := root.findWidgetById(int(t.Parent.Id)) + if parent == nil { + log.Info("gocui: show table error. parent.Id not found", t.Parent.Id) + return + } + log.Info("gocui: need to add grid here id =", t.Grid.Id) - win := initWindowPB(t.Window) - grid := initWindowPB(t.Window) - grid.parent = win + grid := initGridPB(t.Grid) + grid.parent = parent } func enableWidget(n *tree.Node) { |
