1

我已将图像设置为单元格,并且必须在某个时间点删除。

//代码

                   '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

我怎样才能做到这一点?

4

1 回答 1

1

试试看

cell.Appearance.ResetImage()

实际上,单元格ResetXXXX的每个属性都有一个方法Appearance,或者您可以调用通用方法将所有内容重置为默认值

cell.Appearance.Reset()
于 2013-05-16T09:44:17.840 回答