|
-
Dec 7th, 2001, 01:59 PM
#1
Thread Starter
New Member
ComboBox DropDown orientation
Hi,
Somebody has a clue on how can I set the dropdown orientation of a ComboBox ?
I just can't find any API that does that and Comboboxes do not have any Align Property.
It's just because when my ChildForm is maximised, I have some ComboBoxes at the far right and when dropped, we just can't access the sliders...
Thanx
-
Dec 7th, 2001, 02:39 PM
#2
Play around with this code until you get your combo boxes just the right width when the form is maximized.
VB Code:
Private Sub Form_Resize()
Combo1.Width = Me.Width - 3000
End Sub
-
Dec 7th, 2001, 02:42 PM
#3
Another option, although in my opinion, a less desirable option, would be to have the combo drop down automatically when the control received focus.
VB Code:
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Long) As Long
Private Const CB_SHOWDROPDOWN = &H14F
Private Sub Combo1_GotFocus()
Dim DropMe As Long
DropMe = SendMessage(Combo1.hwnd, CB_SHOWDROPDOWN, 1, ByVal 0&)
End Sub
-
Dec 7th, 2001, 02:43 PM
#4
Member
I think he means have the equivalent of the Align property so text in the dropdown could be right-aligned instead of left-aligned, in which case I'd say try changing the RightToLeft property of the control.
-
Dec 7th, 2001, 02:44 PM
#5
Thread Starter
New Member
I am not sure, but I don't think these pieces of code fix the DropDown orientation...
-
Dec 7th, 2001, 02:49 PM
#6
Thread Starter
New Member
You got my point FilBurt1. but my project does not allow me to set the RightToLeft property of my control to True...
Must be something about the language
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
|