Solved

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

Posted on 1998-10-28
10
181 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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

 
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBS file using code from 2nd file (txt or vbs) 4 42
Sorting multiple rows and columns, and count duplicates in Excel 2013 4 87
Spell Check in VB6 13 127
MsgBox 4 68
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

828 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