package main

import (
	"go.wit.com/toolkits/tree"

	"go.wit.com/dev/andlabs/ui"
	_ "go.wit.com/dev/andlabs/ui/winmanifest"
)

// Grid numbering by (X,Y)
// -----------------------------
// -- (1,1) -- (2,1) -- (3,1) --
// -- (1,2) -- (2,1) -- (3,1) --
// -----------------------------
func newGrid(n *tree.Node) {
	if notNew(n) {
		return
	}
	var newt *guiWidget
	newt = new(guiWidget)

	c := ui.NewGrid()
	newt.uiGrid = c
	newt.uiControl = c
	c.SetPadded(true)

	n.TK = newt
	place(n.Parent, n)
}
