/// <summary> /// Draws a combobox button in the specified state, on the specified graphics /// surface, and within the specified bounds /// </summary> /// <param name="g">The Graphics to draw on</param> /// <param name="buttonRect">The Rectangle that represents the dimensions /// of the button</param> /// <param name="clipRect">The Rectangle that represents the clipping area</param> /// <param name="state">A ComboBoxStates value that specifies the /// state to draw the combobox button in</param> public static void DrawComboBoxButton(Graphics g, Rectangle buttonRect, Rectangle clipRect, I3ComboBoxStates state) { if (g == null || buttonRect.Width <= 0 || buttonRect.Height <= 0 || clipRect.Width <= 0 || clipRect.Height <= 0) { return; } if (I3ThemeManager.VisualStylesEnabled) { I3ThemeManager.DrawThemeBackground(g, I3ThemeClasses.ComboBox, (int)I3ComboBoxParts.DropDownButton, (int)state, buttonRect, clipRect); } else { ControlPaint.DrawComboButton(g, buttonRect, I3ThemeManager.ConvertComboBoxStateToButtonState(state)); } }