TableStyle.CellSpacing 屬性

定義

取得或設定表格儲存格之間的距離。

public:
 virtual property int CellSpacing { int get(); void set(int value); };
[System.ComponentModel.Bindable(true)]
public virtual int CellSpacing { get; set; }
public virtual int CellSpacing { get; set; }
[<System.ComponentModel.Bindable(true)>]
member this.CellSpacing : int with get, set
member this.CellSpacing : int with get, set
Public Overridable Property CellSpacing As Integer

屬性值

Int32

表格儲存格之間的距離 (以像素為單位)。 預設值為 -1,表示這個屬性尚未設定。

屬性

例外狀況

指定的距離設定為小於 -1 的值。

備註

CellSpacing 可以使用屬性來控制資料列控制項中相鄰資料格之間的間距。 此間距會垂直和水準套用。 整個資料清單控制項的儲存格間距是一致的。 無法指定每個資料列或資料行之間的個別儲存格間距。

注意

如果您將這個屬性設定為大於的值, 0 並將 GridLines 屬性設定為顯示資料格框線的值,則相鄰資料格的框線之間會顯示間距。 在此情況下, CellSpacing 屬性會控制間距的大小。

這個屬性的值會儲存在 view 狀態中。

適用於

另請參閱