ComboBoxControl.DesignExt.cs 1018 B

123456789101112131415161718192021222324252627282930313233343536
  1. using System.Windows.Forms;
  2. using System.Drawing;
  3. using System.Drawing.Drawing2D;
  4. using FastReport.Utils;
  5. namespace FastReport.Dialog
  6. {
  7. partial class ComboBoxControl
  8. {
  9. #region Protected Methods
  10. /// <inheritdoc/>
  11. protected override bool ShouldSerializeBackColor()
  12. {
  13. return BackColor != SystemColors.Window;
  14. }
  15. /// <inheritdoc/>
  16. protected override bool ShouldSerializeForeColor()
  17. {
  18. return ForeColor != SystemColors.WindowText;
  19. }
  20. /// <inheritdoc/>
  21. protected override SelectionPoint[] GetSelectionPoints()
  22. {
  23. if (ComboBox.DrawMode == DrawMode.Normal)
  24. return new SelectionPoint[] {
  25. new SelectionPoint(AbsLeft - 2, AbsTop + Height / 2, SizingPoint.LeftCenter),
  26. new SelectionPoint(AbsLeft + Width + 1, AbsTop + Height / 2, SizingPoint.RightCenter) };
  27. return base.GetSelectionPoints();
  28. }
  29. #endregion
  30. }
  31. }