Combo Box Size

P

Paul Hammond

Is it possible to have a combo display at a wider width than it's resting
state. I want to have it display all 3 columns when it drops down, but it
only needs to be .5" wide to display the selected code. Seems like a waste
space to make it 2" wide. My cheat is to adjust the width in code, but I
was wondering if there was a setting in the properties that would do this
automatically.

TIA
Paul
 
S

Sprinks

Paul,

No, there is only one Width property per control, no HasFocusWidth and
NotHaveFocusWidth. But I think your solution is the best one.

Sprinks
 
D

Dirk Goldgar

Paul Hammond said:
Is it possible to have a combo display at a wider width than it's
resting state. I want to have it display all 3 columns when it
drops down, but it only needs to be .5" wide to display the selected
code. Seems like a waste space to make it 2" wide. My cheat is to
adjust the width in code, but I was wondering if there was a setting
in the properties that would do this automatically.

The combo box's ListWidth property is what you're looking for. It
defaults to "Auto", which just matches the width of the control, but you
can set it wide enough that all columns show when you drop down the
list.
 
S

Sprinks

Apologies to you, Paul, and my thanks to you, Dirk. I had been misinformed,
and wasting a lot of space on my forms up to now. Not any more.

Sprinks
 
P

Paul Hammond

Thanks Dirk


--
Dirk Goldgar said:
The combo box's ListWidth property is what you're looking for. It
defaults to "Auto", which just matches the width of the control, but you
can set it wide enough that all columns show when you drop down the
list.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 
F

fredg

Is it possible to have a combo display at a wider width than it's resting
state. I want to have it display all 3 columns when it drops down, but it
only needs to be .5" wide to display the selected code. Seems like a waste
space to make it 2" wide. My cheat is to adjust the width in code, but I
was wondering if there was a setting in the properties that would do this
automatically.

TIA
Paul
You can do it with code, but why not display the Combo's property
sheet and simply set the Combo Box ListWidth property to whatever
width you want (2").
The Default setting is Auto.
 
Top