summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-07-28 21:10:13 -0400
committerPietro Gagliardi <[email protected]>2014-07-28 21:10:13 -0400
commit5a70accb2ff053d5487a29f2dc42978227a579aa (patch)
tree4c0fecf15c129427cde91b8776d1a82ba8662dbc
parent7cb6ca1243fd12fe942964c3ffbfa6a9bb80caeb (diff)
Fixed the Tab wrong control drawing issues on Windows.
-rw-r--r--redo/containers_windows.go7
1 files 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))
}