?
Solved

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

Posted on 1998-10-28
10
Medium Priority
?
186 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

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.

Question has a verified solution.

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

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Suggested Courses

718 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