private int RenderIndicatorImage(Graphics g, GridPanel panel, GridContainer row, Rectangle r) { StyleState rowState = GetRowHeaderState(this, r); RowHeaderVisualStyle style = GetEffectiveRowStyle(this, rowState).RowHeaderStyle; Image image = null; GridRow grow = row as GridRow; if (grow != null) { if (grow.IsTempInsertRow == true && grow.IsInsertRow == false) image = panel.GetInsertTempRowImage(); else image = style.GetActiveRowImage(panel); } if (image != null) { if (row.IsActiveRow == true) { if (panel.ActiveRowIndicatorStyle == ActiveRowIndicatorStyle.Image || panel.ActiveRowIndicatorStyle == ActiveRowIndicatorStyle.Both) { Rectangle u = r; u.Size = image.Size; if (r.Height > u.Height) u.Y += (r.Height - u.Height) / 2; u.Intersect(r); g.DrawImageUnscaledAndClipped(image, u); } } return (image.Width); } return (0); }