TextBoxControl.DesignExt.cs 1.1 KB

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