summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authorjshin@chromium.org <jshin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-11 00:21:59 +0000
committerjshin@chromium.org <jshin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-11 00:21:59 +0000
commit865d2747c525417353afff05c2d5f654cc1defb4 (patch)
treef74edc43683da858a06e1966ed47be6bbe22b08e /views
parent54211c3efb9d4a9b47f3369bdc9f95827e39465e (diff)
downloadchromium_src-865d2747c525417353afff05c2d5f654cc1defb4.zip
chromium_src-865d2747c525417353afff05c2d5f654cc1defb4.tar.gz
chromium_src-865d2747c525417353afff05c2d5f654cc1defb4.tar.bz2
Add back 'WS_VSCROLL' flag when creating a combobox window. Without it, the dropdown list of a combobox longer
than the 'default'(?) size gets truncated instead of getting a scrollbar. BUG=13438 (http://crbug.com/13438) TEST=In Options | Under the hood, click 'Fonts & languages' button. The default encoding menu should have a scrollbar. In languages tab, Chrome UI language list contains 49 languages instead of 20(?) or so languages. In a shorter dropdown list (e.g. spellcheck language dropdown), there should be no scrollbar. Review URL: http://codereview.chromium.org/120005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18121 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r--views/controls/combobox/native_combobox_win.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/views/controls/combobox/native_combobox_win.cc b/views/controls/combobox/native_combobox_win.cc
index 8bc53e0..43e1979 100644
--- a/views/controls/combobox/native_combobox_win.cc
+++ b/views/controls/combobox/native_combobox_win.cc
@@ -152,7 +152,11 @@ bool NativeComboboxWin::ProcessMessage(UINT message,
}
void NativeComboboxWin::CreateNativeControl() {
- DWORD flags = WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBS_DROPDOWNLIST;
+ // It's ok to add WS_VSCROLL. The scrollbar will show up only when necessary
+ // as long as we don't use CBS_DISABLENOSCROLL.
+ // See http://msdn.microsoft.com/en-us/library/7h63bxbe(VS.80).aspx
+ DWORD flags = WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN |
+ CBS_DROPDOWNLIST | WS_VSCROLL;
HWND control_hwnd = ::CreateWindowEx(GetAdditionalExStyle(), L"COMBOBOX", L"",
flags, 0, 0, 100, 20, //width(), height(),
GetWidget()->GetNativeView(), NULL, NULL,