How do I set the height of a ComboBox?

Set the DrawMode to OwnerDrawVariable. However customization of the ComboBox leads to other issues. See this link for a tutorial on how to do this completely:

http://www.csharphelp.com/2006/09/listbox-control-in-c/

OwnerDrawVariable sample code here: https://msdn.microsoft.com/en-us/library/system.windows.forms.combobox.drawitem%28v=vs.110%29.aspx

Once that's done, you need to set the ItemHeight property of the combobox to set the effective height of the combobox.


ComboBox auto-sizes to fit the font. Turning that off is not an option. If you want it bigger then give it a bigger font.


Just as another option, if you'd like to increase the height of the ComboBox without increasing the font size or having to worry about drawing everything yourself, you can use a simple Win32 API call to increase the height like this:

using System;
using System.Runtime.InteropServices;
using System.Windows.Forms;

namespace Win32ComboBoxHeightExample
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        [DllImport("user32.dll")]
        static extern IntPtr SendMessage(IntPtr hWnd, UInt32 Msg, Int32 wParam, Int32 lParam);
        private const Int32 CB_SETITEMHEIGHT = 0x153;

        private void SetComboBoxHeight(IntPtr comboBoxHandle, Int32 comboBoxDesiredHeight)
        {
            SendMessage(comboBoxHandle, CB_SETITEMHEIGHT, -1, comboBoxDesiredHeight);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            SetComboBoxHeight(comboBox1.Handle, 150);
            comboBox1.Refresh();
        }
    }
}

Result:

enter image description here