diff options
| author | Pietro Gagliardi <[email protected]> | 2014-04-13 13:00:07 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-04-13 13:00:07 -0400 |
| commit | 6c265dd54daf4567ec9d2cc23834279a4a690393 (patch) | |
| tree | 808565c27565026cf1cce7c3beca3ec2cd61b1c6 /sysdata_windows.go | |
| parent | 417bdb89492dc1eb2ca53535fd9891e3cb5bb7d7 (diff) | |
Rolled back the Windows horizontally scrolling Listbox changes because I can't seem to get it to work on Mac OS X (and keeping that code there is inefficient); removed the guarantee of horizontal scrollbars in Listbox and made that a future plan. Both the Windows and the non-working Mac OS X code is in unmigrated/hscrolllistbox.go (and the unmigrated/ folder will be renamed shortly).
Diffstat (limited to 'sysdata_windows.go')
| -rw-r--r-- | sysdata_windows.go | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sysdata_windows.go b/sysdata_windows.go index 5fcd742..57f7d58 100644 --- a/sysdata_windows.go +++ b/sysdata_windows.go @@ -87,13 +87,12 @@ var classTypes = [nctypes]*classData{ }, c_listbox: &classData{ name: "LISTBOX", - // TODO also _WS_HSCROLL? // we don't use _LBS_STANDARD because it sorts (and has WS_BORDER; see above) // _LBS_NOINTEGRALHEIGHT gives us exactly the size we want // TODO say why we don't use LBS_MULTISEL (listbox docs and http://msdn.microsoft.com/en-us/library/windows/desktop/aa511485.aspx) - style: _LBS_NOTIFY | _LBS_NOINTEGRALHEIGHT | _WS_HSCROLL | _WS_VSCROLL | controlstyle, + style: _LBS_NOTIFY | _LBS_NOINTEGRALHEIGHT | _WS_VSCROLL | controlstyle, xstyle: _WS_EX_CLIENTEDGE | controlxstyle, - altStyle: _LBS_EXTENDEDSEL | _LBS_NOTIFY | _LBS_NOINTEGRALHEIGHT | _WS_HSCROLL | _WS_VSCROLL | controlstyle, + altStyle: _LBS_EXTENDEDSEL | _LBS_NOTIFY | _LBS_NOINTEGRALHEIGHT | _WS_VSCROLL | controlstyle, appendMsg: _LB_ADDSTRING, insertBeforeMsg: _LB_INSERTSTRING, deleteMsg: _LB_DELETESTRING, @@ -355,7 +354,6 @@ func (s *sysData) append(what string) { } else if r.ret == uintptr(classTypes[s.ctype].selectedIndexErr) { panic(fmt.Errorf("failed to add item to combobox/listbox (last error: %v)", r.err)) } - recalcListboxWidth(s.hwnd) } func (s *sysData) insertBefore(what string, index int) { @@ -377,7 +375,6 @@ func (s *sysData) insertBefore(what string, index int) { } else if r.ret == uintptr(classTypes[s.ctype].selectedIndexErr) { panic(fmt.Errorf("failed to add item to combobox/listbox (last error: %v)", r.err)) } - recalcListboxWidth(s.hwnd) } func (s *sysData) selectedIndex() int { @@ -528,7 +525,6 @@ func (s *sysData) delete(index int) { if r.ret == uintptr(classTypes[s.ctype].selectedIndexErr) { panic(fmt.Errorf("failed to delete item from combobox/listbox (last error: %v)", r.err)) } - recalcListboxWidth(s.hwnd) } func (s *sysData) setIndeterminate() { |
