如何在C#winforms中获得ComboBox的"下拉按钮"大小

Hai*_*ihi 8 c# combobox winforms

我怎样才能得到DropDown Button一个ComboBox

对于任何不确定我的意思的人来说,它Button通常位于ComboBox包含向下箭头的右侧.单击时,将展开该DropDown部分.

为了进一步说明,它是下图中红色圆圈中的按钮.

在此输入图像描述

Dmi*_*nko 12

对于这样的常量,您可以使用GetSystemMetrics API函数; C#quick analogue是SystemInformation类:

  using System.Windows.Forms;

  ...

  int arrowWidth = SystemInformation.VerticalScrollBarWidth;
Run Code Online (Sandbox Code Playgroud)