Solved

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

Posted on 1998-10-28
10
182 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
Technology Partners: 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Determine Range to Select 5 63
Run code from text file in vb 1 101
Add a task in Outlook from access 11 43
VB script to continue despite error 2 77
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

737 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