• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 194
  • Last Modified:

How do i make the combo box drop-down list larger than.....

In access i can make the drop-down list of the combo box larger than combo box itself. How do i make that in VB?

thanx in advance, guys

MG
0
mguedes
Asked:
mguedes
  • 3
  • 2
  • 2
  • +3
1 Solution
 
mark2150Commented:
The control should "grow" scroll bars as the list contents gets more than what the list can show comfortably.

M

0
 
BergJCCommented:
I think the problem mguedes is having is that his list items are being truncated. The way I understand it, he wants to have the list width be greater than the actual width of the ComboBox itself.

With the conventional ComboBox control, I don't know of any way to do it. I use a custom control called Crescent CSComboBox, which lets me set a ListWidth property. I'm guessing however, that you can create your own control to do this, but I don't know the specifics.
0
 
mguedesAuthor Commented:
I just want to increase the width of the drop-down list more than the combo box........
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
mark2150Commented:
Oh, *WIDTH* I thought he meant *LENGTH*. *NEVER MIND!*

M

0
 
fguerreiro_inixCommented:
Use IntegralHeight property . Use it set to true to resize itself to display only complete items.

Hope this helps
Regards
0
 
kswinneyCommented:
If you'll post your e-mail address, I'll send you an example in VB code of how to create a combo box with a list width greater than the combo.
0
 
mguedesAuthor Commented:
Ok, here is my email.....
mguedes@utad.pt
0
 
ChamberlainCommented:
Put this in a module...

Public Const CB_SETDROPPEDWIDTH = &H160
Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long

and this in the form load...

SendMessage Combo1.hwnd, CB_SETDROPPEDWIDTH, 500, 0

the 500 is the minimum number of pixels it can be.  The last pararmeter is not used.  Leave as 0.



0
 
ChamberlainCommented:
Oh.. by the way..   Only 5 points?
0
 
mguedesAuthor Commented:
that this, thanx Chamberlain's
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
  • 2
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now