summaryrefslogtreecommitdiff
path: root/redo/tab_windows.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-08-04 21:33:58 -0400
committerPietro Gagliardi <[email protected]>2014-08-04 21:33:58 -0400
commit12f7c691d310736e945cd77a943769fbcc5c0635 (patch)
tree0c479a9601b45a6119d42c4959fee72264ace03c /redo/tab_windows.go
parent95815841aa7574f5fd91d11795ceacaa4b7fa5fa (diff)
Same as previous commit, but for showing and hiding containers on Windows.
Diffstat (limited to 'redo/tab_windows.go')
-rw-r--r--redo/tab_windows.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/redo/tab_windows.go b/redo/tab_windows.go
index c16cdb4..4eb960d 100644
--- a/redo/tab_windows.go
+++ b/redo/tab_windows.go
@@ -44,8 +44,7 @@ func (t *tab) Append(name string, control Control) {
}
// 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 {
- // TODO move these calls to container itself
- C.ShowWindow(t.tabs[len(t.tabs) - 1].hwnd, C.SW_HIDE)
+ t.tabs[len(t.tabs) - 1].hide()
}
C.tabAppend(t._hwnd, toUTF16(name))
}
@@ -53,13 +52,13 @@ func (t *tab) Append(name string, control Control) {
//export tabChanging
func tabChanging(data unsafe.Pointer, current C.LRESULT) {
t := (*tab)(data)
- C.ShowWindow(t.tabs[int(current)].hwnd, C.SW_HIDE)
+ t.tabs[int(current)].hide()
}
//export tabChanged
func tabChanged(data unsafe.Pointer, new C.LRESULT) {
t := (*tab)(data)
- C.ShowWindow(t.tabs[int(new)].hwnd, C.SW_SHOW)
+ t.tabs[int(new)].show()
}
func (t *tab) hwnd() C.HWND {