Solved

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

Posted on 1998-10-28
10
184 Views
Last Modified: 2012-05-04
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
Comment
Question by:mguedes
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +3
10 Comments
 
LVL 12

Expert Comment

by:mark2150
ID: 1442084
The control should "grow" scroll bars as the list contents gets more than what the list can show comfortably.

M

0
 
LVL 2

Expert Comment

by:BergJC
ID: 1442085
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
 

Author Comment

by:mguedes
ID: 1442086
I just want to increase the width of the drop-down list more than the combo box........
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 12

Expert Comment

by:mark2150
ID: 1442087
Oh, *WIDTH* I thought he meant *LENGTH*. *NEVER MIND!*

M

0
 
LVL 3

Expert Comment

by:fguerreiro_inix
ID: 1442088
Use IntegralHeight property . Use it set to true to resize itself to display only complete items.

Hope this helps
Regards
0
 
LVL 2

Expert Comment

by:kswinney
ID: 1442089
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
 

Author Comment

by:mguedes
ID: 1442090
Ok, here is my email.....
mguedes@utad.pt
0
 
LVL 1

Accepted Solution

by:
Chamberlain earned 0 total points
ID: 1442091
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
 
LVL 1

Expert Comment

by:Chamberlain
ID: 1442092
Oh.. by the way..   Only 5 points?
0
 

Author Comment

by:mguedes
ID: 1442093
that this, thanx Chamberlain's
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month5 days, 21 hours left to enroll

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question