Esempio n. 1
0
func (t *tab) Append(name string, control Control) {
	c := newContainer(control)
	t.tabs = append(t.tabs, c)
	cname := C.CString(name)
	defer C.free(unsafe.Pointer(cname))
	C.tabAppend(t._id, cname, c.id)
}
Esempio n. 2
0
// TODO margined
func (t *tab) Append(name string, control Control) {
	control.setParent(&controlParent{t.hwnd})
	t.children = append(t.children, control)
	// initially hide tab 1..n controls; if we don't, they'll appear over other tabs, resulting in weird behavior
	if len(t.children) != 1 {
		t.children[len(t.children)-1].containerHide()
	}
	C.tabAppend(t.hwnd, toUTF16(name))
}
Esempio n. 3
0
func (t *tab) Append(name string, control Control) {
	c := newContainer(control.resize)
	t.tabs = append(t.tabs, c)
	control.setParent(c.parent())
	t.children = append(t.children, control)
	cname := C.CString(name)
	defer C.free(unsafe.Pointer(cname))
	C.tabAppend(t.id, cname, c.id)
}
Esempio n. 4
0
func (t *tab) Append(name string, control Control) {
	c := newContainer(control)
	c.setParent(&controlParent{t._hwnd})
	t.tabs = append(t.tabs, c)
	// initially hide tab 1..n controls; if we don't, they'll appear over other tabs, resulting in weird behavior
	if len(t.tabs) != 1 {
		t.tabs[len(t.tabs)-1].hide()
	}
	C.tabAppend(t._hwnd, toUTF16(name))
}