[]-35216/親
DataGridViewの行ヘッダーに行番号を表示した時のエラー
たこ

最初--br>    If e.ColumnIndex < 0 And e.RowIndex >= 0 Then
      'セルを描画する
      e.Paint(e.ClipBounds, DataGridViewPaintParts.All)       '←ここで発生 コメントアウトするとフォーム拡大縮小時にゴミが残る…

      '行番号を描画する範囲を決定する
      'e.AdvancedBorderStyleやe.CellStyle.Paddingは無視しています
      Dim indexRect As Rectangle = e.CellBounds
      indexRect.Inflate(-2, -2)
      '行番号を描画する
      TextRenderer.DrawText(e.Graphics,
                (e.RowIndex + 1).ToString(),
                e.CellStyle.Font,
                indexRect,
                e.CellStyle.ForeColor,
                TextFormatFlags.Right Or TextFormatFlags.VerticalCenter)
      '描画が完了したことを知らせる
      e.Handled = True
    End If

    DataGridView1.AlternatingRowsDe -->続き

11/04 02:12
[|]
レスを書く
1番最初のレス
Child K-Tai