忍者ブログ
  • 2025.06
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 2025.08
[PR]
×

[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。

【2025/07/19 21:28 】 |
お手軽簡単ダイエット~その43~
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace WindowsFormsApplication1 { public partial class Form1 : Form { //コンストラクタ public Form1() { InitializeComponent(); } //画面ロード private void Form1_Load(object sender, EventArgs e) { //通常のボタン列を作成 DataGridViewButtonColumn dgvBtnCols = new DataGridViewButtonColumn(); //ボタン列を拡張ボタンに設定 dgvBtnCols.CellTemplate = new DataGridButtonCellEx(); this.dataGridView1.Columns.Add(dgvBtnCols); } } /****************************************************************/ //DataGridViewButtonCellの拡張クラスを作成 /****************************************************************/ public partial class DataGridButtonCellEx : DataGridViewButtonCell { protected override void Paint(Graphics graphics, Rectangle clipBounds, Rectangle cellBounds, int rowIndex, DataGridViewElementStates elementState, object value, object formattedValue, string errorText, DataGridViewCellStyle cellStyle, DataGridViewAdvancedBorderStyle advancedBorderStyle, DataGridViewPaintParts paintParts) { base.Paint(graphics, clipBounds, cellBounds, rowIndex, elementState, value, formattedValue, errorText, cellStyle, advancedBorderStyle, paintParts); TextRenderer.DrawText(graphics, "◎", this.DataGridView.Font, cellBounds, Color.Blue); } } }
PR
【2011/05/18 21:32 】 | 未選択 | 有り難いご意見(0) | トラックバック()
<<効果があるダイエットサプリ~その5~ | ホーム | 座ってるだけで痩せるダイエット座布団>>
有り難いご意見
貴重なご意見の投稿














虎カムバック
トラックバックURL

<<前ページ | ホーム | 次ページ>>