I have Combo Box. I need to display the the Full value of the string in Combo Box with out increasing the Combo Box Size. Pl Help
Printable View
I have Combo Box. I need to display the the Full value of the string in Combo Box with out increasing the Combo Box Size. Pl Help
If you're asking how to increase width of the dropdown portion then try thjis:
Actual width can be calculated using Me.TextWidth("your text goes here") but you will have to:Code:Option Explicit
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_SETDROPPEDWIDTH = &H160
Private Sub Form_Load()
SendMessage Combo1.hwnd, CB_SETDROPPEDWIDTH, (Combo1.Width / Screen.TwipsPerPixelX) * 2, 0
End Sub
- set Fiorm1.Font = Combo1.Font
- find largest text first - if you loop through items then you can calc each new item and compare its width to previous;
That works great for only the dropdown list but it won't increase the width of the text area
Thank You So Much..... that what I need.
Thanks a Lot
You're welcome.