我已将图像设置为单元格,我必须在某个时间点删除。
//代码
'Get the first cell of the first column in the grid
UltraGridCell = UltraGridRow.Cells(UltraGridColumn.Index)
If (UltraGridColumn.Hidden = False) Then
'Set the cell image
UltraGridCell.Appearance.Image = My.Resources.Tran_comment_161
UltraGridCell.Appearance.ImageHAlign = HAlign.Right
UltraGridCell.Appearance.ImageVAlign = VAlign.Top
Exit For
Else
'Code to remove the image from the cell
End If
我该怎么做?
答案 0 :(得分:1)
试试
cell.Appearance.ResetImage()
实际上,单元格的每个ResetXXXX
属性都有一个Appearance
方法,或者您可以将所有内容重置为调用常规方法的默认值
cell.Appearance.Reset()