欧美大屁股bbbbxxxx,狼人大香伊蕉国产www亚洲,男ji大巴进入女人的视频小说,男人把ji大巴放进女人免费视频,免费情侣作爱视频

歡迎來到入門教程網!

C#教程

當前位置:主頁 > 軟件編程 > C#教程 >

Winform讓DataGridView左側顯示圖片

來源:本站原創(chuàng)|時間:2020-01-10|欄目:C#教程|點擊: 次

效果圖片

重寫DataGridView的OnRowPostPaint方法或者直接在DataGridView的RowPostPaint事件里寫,如下(重寫DataGridView的OnRowPostPaint方法)

using System;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
namespace Test
{
  class DataGridViewEx : DataGridView
  {
    SolidBrush solidBrush;
    public DataGridViewEx()
    {
      solidBrush = new SolidBrush(this.RowHeadersDefaultCellStyle.ForeColor);
    }

    protected override void OnRowPostPaint(DataGridViewRowPostPaintEventArgs e)
    {
      e.Graphics.DrawImage(Image對象, e.RowBounds.Location.X, e.RowBounds.Location.Y); base.OnRowPostPaint(e);
    }
  }
}

以上就是重寫DataGridView的OnRowPostPaint方法,希望能給大家一個參考,也希望大家多多支持我們。

上一篇:C# 設計模式系列教程-命令模式

欄    目:C#教程

下一篇:C# 設計模式系列教程-外觀模式

本文標題:Winform讓DataGridView左側顯示圖片

本文地址:http://mengdiqiu.com.cn/a1/C_jiaocheng/6495.html

網頁制作CMS教程網絡編程軟件編程腳本語言數據庫服務器

如果侵犯了您的權利,請與我們聯(lián)系,我們將在24小時內進行處理、任何非本站因素導致的法律后果,本站均不負任何責任。

聯(lián)系QQ:835971066 | 郵箱:835971066#qq.com(#換成@)

Copyright © 2002-2020 腳本教程網 版權所有