セルヘッダーに画像を表示する必要があります。問題は、GUI 用のさまざまなメソッドを含むクラスを使用していて、クラスで cellPaint イベントを使用する方法がわからないことです。クラスからそれを更新する別の方法はありますか、セル値を更新できるのと同じ方法ですか、それとも cellPaint イベントでなければなりませんか? ありがとう!
編集:
class GUI {
public void FixGridCells(DataGridView grid){
}
public void AssignCellImages(DataGridView grid){
grid.Column[0].Header = myImage; // <-- This is what I need
}
}
// MyForm.cs
MyForm_Load(){
GUI gui = new GUI();
gui.FixGridSize(myGrid);
gui.AssignCellImages(myGrid); // <-- I need to call it like this
}