diff options
| author | Pietro Gagliardi <[email protected]> | 2014-10-15 13:30:35 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-10-15 13:30:35 -0400 |
| commit | 0e32aff30b87b7dc355c825949e6096ca90e7165 (patch) | |
| tree | b938553e097b6b5d084ecd2df2fa78bb8f1588de /newctrl/tab_windows.go | |
| parent | 6b2dac42002cc09972106d75093e504fe33e7a9f (diff) | |
Fixed compiler errors.
Diffstat (limited to 'newctrl/tab_windows.go')
| -rw-r--r-- | newctrl/tab_windows.go | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/newctrl/tab_windows.go b/newctrl/tab_windows.go index f4481c6..af642ea 100644 --- a/newctrl/tab_windows.go +++ b/newctrl/tab_windows.go @@ -38,7 +38,7 @@ func newTab() Tab { // TODO margined func (t *tab) Append(name string, control Control) { c := newContainer() - control.setParent(&containerParent{c.hwnd}) + control.setParent(&controlParent{c.hwnd}) t.tabs = append(t.tabs, c) 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 @@ -75,8 +75,8 @@ return C.TRUE/*TODO } func (t *tab) preferredSize(d *sizing) (width, height int) { - for _, s := range t.tabs { - w, h := s.child.preferredSize(d) + for _, c := range t.children { + w, h := c.preferredSize(d) if width < w { width = w } @@ -102,7 +102,7 @@ func (t *tab) resize(x int, y int, width int, height int, d *sizing) { r.top = C.LONG(0) r.right = C.LONG(width) r.bottom = C.LONG(height) - C.tabGetContentRect(t._hwnd, &r) + C.tabGetContentRect(t.hwnd, &r) // and resize tabs // don't resize just the current tab; resize all tabs! for i, _ := range t.tabs { @@ -110,6 +110,4 @@ func (t *tab) resize(x int, y int, width int, height int, d *sizing) { t.tabs[i].resize(int(r.left), int(r.top), int(r.right - r.left), int(r.bottom - r.top), d) t.children[i].resize(int(r.left), int(r.top), int(r.right - r.left), int(r.bottom - r.top), d) } - // and now resize the tab control itself - basecommitResize(t, c, d) } |
