using System.Windows.Forms;
using System.Drawing;
using FastReport.Utils;
namespace FastReport
{
partial class CheckBoxObject
{
#region Public Methods
///
public override SizeF GetPreferredSize()
{
if ((Page as ReportPage).IsImperialUnitsUsed)
return new SizeF(Units.Inches * 0.2f, Units.Inches * 0.2f);
return new SizeF(Units.Millimeters * 5, Units.Millimeters * 5);
}
///
public override SmartTagBase GetSmartTag()
{
return new CheckBoxSmartTag(this);
}
///
public override void OnMouseDown(MouseEventArgs e)
{
if (Editable && !Config.WebMode)
{
Checked = !Checked;
if (Page != null)
{
Page.NeedModify = true;
Page.NeedRefresh = true;
}
}
else base.OnMouseDown(e);
}
#endregion
}
}