隣接するテーブル セル間の間隔 (ピクセル単位) を取得または設定します。
Public Overridable Property CellSpacing As Integer
[C#]
public virtual int CellSpacing {get; set;}
[C++]
public: __property virtual int get_CellSpacing();public: __property virtual void set_CellSpacing(int);
[JScript]
public function get CellSpacing() : int;public function set CellSpacing(int);
プロパティ値
隣接するテーブル セル間の間隔 (ピクセル単位)。既定値は -1 です。このプロパティが設定されていないことを示します。
解説
このプロパティは、 RepeatLayout プロパティが RepeatLayout.Table に設定されている場合にだけ適用されます。
このプロパティを使用して、テーブルのそれぞれのセル間の余白を制御します。このプロパティは垂直方向と水平方向の両方に適用されます。
使用例
[Visual Basic, C#, JScript] CellSpacing プロパティを使用して、 RadioButtonList のセル間の余白を 10 ピクセルにする方法を次の例に示します。
<%@ Page Language="VB" AutoEventWireup="True" %>
<asp:RadioButtonList id=RadioButtonList1
RepeatLayout = "Table"
CellSpacing = "10"
runat="server">
<asp:ListItem>Item 1</asp:ListItem>
<asp:ListItem>Item 2</asp:ListItem>
<asp:ListItem>Item 3</asp:ListItem>
<asp:ListItem>Item 4</asp:ListItem>
<asp:ListItem>Item 5</asp:ListItem>
<asp:ListItem>Item 6</asp:ListItem>
</asp:RadioButtonList>
[C#]
<%@ Page Language="C#" AutoEventWireup="True" %>
<asp:RadioButtonList id=RadioButtonList1
RepeatLayout = "Table"
CellSpacing = "10"
runat="server">
<asp:ListItem>Item 1</asp:ListItem>
<asp:ListItem>Item 2</asp:ListItem>
<asp:ListItem>Item 3</asp:ListItem>
<asp:ListItem>Item 4</asp:ListItem>
<asp:ListItem>Item 5</asp:ListItem>
<asp:ListItem>Item 6</asp:ListItem>
</asp:RadioButtonList>
[JScript]
<%@ Page Language="JScript" AutoEventWireup="True" %>
<asp:RadioButtonList id=RadioButtonList1
RepeatLayout = "Table"
CellSpacing = "10"
runat="server">
<asp:ListItem>Item 1</asp:ListItem>
<asp:ListItem>Item 2</asp:ListItem>
<asp:ListItem>Item 3</asp:ListItem>
<asp:ListItem>Item 4</asp:ListItem>
<asp:ListItem>Item 5</asp:ListItem>
<asp:ListItem>Item 6</asp:ListItem>
</asp:RadioButtonList>
[C++] C++ のサンプルはありません。Visual Basic、C#、および JScript のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 2000, Windows XP Professional, Windows Server 2003 ファミリ
参照
RadioButtonList クラス | RadioButtonList メンバ | System.Web.UI.WebControls 名前空間 | CellPadding