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) }
// 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)) }
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) }
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)) }