|
-
August 8th, 1999, 05:49 PM
#1
Problem wih HScroll of ComboBox
I have Form View with ComboBox, I've checked auto HScroll property of ComboBox and I've call CComboBox::SetHorizontalExtent(int) and set length of my biggest string in picksels but HScrollBar never appear. Help me pls.
-
August 27th, 1999, 10:50 AM
#2
Re: Problem wih HScroll of ComboBox
Hi,
I think there is a problem . I to tried with the same but the horizontal scrollbar does not appear.
The solution to this is open the .RC file in text mode and add WS_HSCROLL to the styles of the combo box.
Keep rest of the styles as it is
"CBS_AUTOHSCROLL| CBS_SORT | WS_VSCROLL | WS_TABSTOP
To the above style add WS_HSCROLL.
and that works. U will see the Horizontal scrollbar for ur Combobox.
Also call the SetHorizontalExtent
Reply me wether it worked for u
-Regards
Vikram
-
August 28th, 1999, 02:16 PM
#3
Re: Problem wih HScroll of ComboBox
Hi,
Thank you very much, now it's works.
But I'm still wondering two thinks
1. Why there is no property for this style in property box.
2. Can I do it programmatically, I've tried thinks like below but it doesn't works
CComboBox* pCombo=(CComboBox*) GetDlgItem(IDC_COMBO1);
DWORD style=pCombo->GetStyle();
pCombo->ModifyStyle(style,style|WS_HSCROLL);
Thanks one more time.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|