2011-08-08 25 views
1

我正在學習.NET中的設計模式。我想知道DataGridView的CellPainting中使用的設計模式的類型。DataGridView CellPaiting中的設計模式

在DataGridView中,你可以定義的DataGridViewColumn的類型,你想要的,例如:DataGridViewTextBoxColumn,DataGridViewLinkColumn,...

DataGridView中有一個方法CellPainting,它可以根據類型的列畫一個細胞。示例:如果單元格位於DataGridViewLinkColumn中,則此單元格將像鏈接一樣繪製(文本是下劃線,文本顏色是藍色的,...)。

謝謝。

回答