DotNet 4.8.1 build of DotNetBar
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Forms.VisualStyles;
|
||||
|
||||
namespace DevComponents.DotNetBar.SuperGrid
|
||||
{
|
||||
///<summary>
|
||||
/// CheckDisplay
|
||||
///</summary>
|
||||
static public class CheckDisplay
|
||||
{
|
||||
///<summary>
|
||||
/// RenderCheckbox
|
||||
///</summary>
|
||||
///<param name="g"></param>
|
||||
///<param name="bounds"></param>
|
||||
///<param name="cstate"></param>
|
||||
///<param name="bstate"></param>
|
||||
static public void RenderCheckbox(
|
||||
Graphics g, Rectangle bounds, CheckBoxState cstate, ButtonState bstate)
|
||||
{
|
||||
Size csize = CheckBoxRenderer.GetGlyphSize(g, cstate);
|
||||
|
||||
if (Application.RenderWithVisualStyles == true)
|
||||
{
|
||||
Point pt = bounds.Location;
|
||||
pt.Y += (bounds.Height - csize.Height) / 2;
|
||||
|
||||
CheckBoxRenderer.DrawCheckBox(g, pt, cstate);
|
||||
}
|
||||
else
|
||||
{
|
||||
ControlPaint.DrawCheckBox(g, bounds, bstate);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user