Solved

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

Posted on 1998-10-28
10
176 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
  • 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
 
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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

706 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now