テーブル セルの境界と内容との間隔 (ピクセル単位) を取得または設定します。
Public Overridable Property CellPadding As Integer
[C#]
public virtual int CellPadding {get; set;}
[C++]
public: __property virtual int get_CellPadding();public: __property virtual void set_CellPadding(int);
[JScript]
public function get CellPadding() : int;public function set CellPadding(int);
プロパティ値
テーブル セルの境界と内容との間隔 (ピクセル単位)。既定値は -1 です。このプロパティが設定されていないことを示します。
解説
このプロパティは、 RepeatLayout プロパティが RepeatLayout.Table に設定されている場合にだけ適用されます。
このプロパティを使用して、セルの内容とセルの境界との間の余白を制御します。
指定した余白の量は、セルの 4 側面のすべてに追加されます。これにはテーブルの最も高いセルの高さと最も幅の広いセルの幅を使用します。生成されるセルのサイズは、テーブルのすべてのセルに均一に適用されます。それぞれのセルのサイズを指定することはできません。
使用例
[Visual Basic, C#, JScript] CellPadding プロパティを使用して、 RadioButtonList のセルに 10 ピクセルの余白を追加する方法を次の例に示します。
<%@ Page Language="VB" AutoEventWireup="True" %>
<asp:RadioButtonList id=RadioButtonList1
CellPadding = "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
CellPadding = "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
CellPadding = "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 名前空間 | CellSpacing