summaryrefslogtreecommitdiff
path: root/toolkit/andlabs/grid.go
blob: 87649625d75cb85100eb52ed09662886b1587125 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package main

import (
	"github.com/andlabs/ui"
	_ "github.com/andlabs/ui/winmanifest"
)

// Grid numbering by (X,Y)
// -----------------------------
// -- (1,1) -- (2,1) -- (3,1) --
// -- (1,2) -- (2,1) -- (3,1) --
// -----------------------------
func (p *node) newGrid(n *node) {
	var newt *andlabsT
	log(debugToolkit, "newGrid()", n.WidgetId, "to", n.ParentId)

	newt = new(andlabsT)

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

	n.tk = newt
	p.place(n)
}