Re:Autosize a TComboBox
The only way to control combobox height is to make it owner-draw.
1. Set Style to csOwnerDrawFixed or csOwnerDrawVariable.
2. Adjust ItemHeight to whatever you want.
3. There's a bug in TCombobox at design time so you won't see the control's
height change until you force it to be recreated. Just toggle the Ctl3D
property.
Delphi provides a default drawing implementation that looks something like
the standard combobox, so even though you've specified owner-draw, you
don't actually have to provide any painting code.
--
Tim Knipe | Plasmatech Software Design | http://plasmatech.com
Explorer controls for Delphi, C++Builder and soon ActiveX!
Quote
> Darron, wrote
> > The TEdit component has the autosize property which when set to false
> > stops the box from expanding as the font size is increased. The
> > TCombobox, however does not allow for this. DOes anyone know of a way
> > to stop a combobox from expanding with the font!?!