From 5a70accb2ff053d5487a29f2dc42978227a579aa Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Mon, 28 Jul 2014 21:10:13 -0400 Subject: [PATCH] Fixed the Tab wrong control drawing issues on Windows. --- redo/containers_windows.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/redo/containers_windows.go b/redo/containers_windows.go index 66f6edf..d0d8496 100644 --- a/redo/containers_windows.go +++ b/redo/containers_windows.go @@ -14,8 +14,7 @@ On Windows, container controls are just regular controls; their children have to TODO - make sure all tabs cannot be deselected (that is, make sure the current tab can never have index -1) -- make sure tabs initially show the right control -- for some reason the text entry tabs show the checkbox tab until the checkbox tab is clicked, THEN they show their proper contents +- see if we can safely make the controls children of the tab control itself or if that would just screw our subclassing */ type tab struct { @@ -49,6 +48,10 @@ func (t *tab) Append(name string, control Control) { if t.parent != nil { c.child.setParent(t.parent) } + // 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 { + c.child.containerHide() + } C.tabAppend(t.hwnd, toUTF16(name)) }