protected void DrawCheckBox(Graphics g, Rectangle r, bool _checked) { CheckEditViewInfo info = edit.CreateViewInfo() as CheckEditViewInfo; CheckEditPainter painter = edit.CreatePainter() as CheckEditPainter; info.EditValue = _checked; info.Bounds = r; info.CalcViewInfo(g); ControlGraphicsInfoArgs args = new ControlGraphicsInfoArgs(info, new GraphicsCache(g), r); painter.Draw(args); args.Cache.Dispose(); }
void DrawCheckBox(Graphics g, Rectangle r, bool chk, bool colHeader) { CheckEditViewInfo info = (edit.CreateViewInfo() as CheckEditViewInfo); CheckEditPainter painter = (edit.CreatePainter() as CheckEditPainter); ControlGraphicsInfoArgs args; info.EditValue = chk; if (colHeader) { r.Height += 20; } else { r.Width += 40; } info.Bounds = r; info.CalcViewInfo(g); args = new ControlGraphicsInfoArgs(info, new DevExpress.Utils.Drawing.GraphicsCache(g), r); painter.Draw(args); args.Cache.Dispose(); }