System.Windows.Forms.ThemeWin32Classic.DataGridPaintRowHeader C# (CSharp) Method

DataGridPaintRowHeader() public method

public DataGridPaintRowHeader ( Graphics g, Rectangle bounds, int row, System.Windows.Forms.DataGrid grid ) : void
g System.Drawing.Graphics
bounds System.Drawing.Rectangle
row int
grid System.Windows.Forms.DataGrid
return void
		public override void DataGridPaintRowHeader (Graphics g, Rectangle bounds, int row, DataGrid grid)
		{
			bool is_add_row = grid.ShowEditRow && row == grid.DataGridRows.Length - 1;
			bool is_current_row = row == grid.CurrentCell.RowNumber;

			// Background
			g.FillRectangle (ResPool.GetSolidBrush (grid.CurrentTableStyle.CurrentHeaderBackColor), bounds);

			// Draw arrow
			if (is_current_row) {
				if (grid.IsChanging) {
					g.DrawString ("...", grid.Font,
						      ResPool.GetSolidBrush (grid.CurrentTableStyle.CurrentHeaderForeColor),
						      bounds);
				} else {
					Rectangle rect = new Rectangle (bounds.X - 2, bounds.Y, 18, 18);
					DataGridPaintRowHeaderArrow (g, rect, grid);
				}
			}
			else if (is_add_row) {
				DataGridPaintRowHeaderStar (g, bounds, grid);
			}

			if (!grid.FlatMode && !is_add_row) {
				CPDrawBorder3D (g, bounds, Border3DStyle.RaisedInner, 
					Border3DSide.Left | Border3DSide.Right | 
					Border3DSide.Top | Border3DSide.Bottom);
			}
		}
		
ThemeWin32Classic