summaryrefslogtreecommitdiff
path: root/table.go
diff options
context:
space:
mode:
Diffstat (limited to 'table.go')
-rw-r--r--table.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/table.go b/table.go
index c374d2f..7e1ad4f 100644
--- a/table.go
+++ b/table.go
@@ -307,6 +307,19 @@ func (me *TreeInfo) addTableRow(t *guipb.Table, grid *Node, name string, w int)
return false
}
+// returns true if widget is in a table
+func (n *Node) InTable() bool {
+ // log.Info("InTable() parent id =", n.ParentId)
+ grid := FindWidgetById(int(n.ParentId))
+ if grid != nil {
+ if grid.WidgetType == widget.Grid {
+ return true
+ }
+ }
+
+ return false
+}
+
func dumpTable(t *guipb.Table) {
for i, o := range t.Order {
log.Info("got order:", t.Title, i, o)