diff options
Diffstat (limited to 'redo/tab_windows.go')
| -rw-r--r-- | redo/tab_windows.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/redo/tab_windows.go b/redo/tab_windows.go index 1d22887..371d7bc 100644 --- a/redo/tab_windows.go +++ b/redo/tab_windows.go @@ -34,7 +34,7 @@ func newTab() Tab { func (t *tab) Append(name string, control Control) { c := newContainer(control) - c.setParent(&controlParent{t._hwnd}) + c.setParent(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 { @@ -55,6 +55,15 @@ func tabChanged(data unsafe.Pointer, new C.LRESULT) { t.tabs[int(new)].show() } +//export tabTabHasChildren +func tabTabHasChildren(data unsafe.Pointer, which C.LRESULT) C.BOOL { + t := (*tab)(data) + if t.tabs[int(which)].nchildren > 0 { + return C.TRUE + } + return C.FALSE +} + func (t *tab) hwnd() C.HWND { return t._hwnd } |
