RadioButtonList.CellSpacing Własność
Definicja
Ważny
Niektóre informacje dotyczą produktów przedpremierowych, które mogą zostać znacznie zmodyfikowane przed premierą. Microsoft nie udziela żadnych gwarancji, ani wyraźnych, ani domniemanych, dotyczących informacji podanych tutaj.
Pobiera lub ustawia odległość (w pikselach) między sąsiednimi komórkami tabeli.
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
Wartość nieruchomości
Odległość (w pikselach) między sąsiednimi komórkami tabeli. Wartość domyślna to -1, która wskazuje, że ta właściwość nie jest ustawiona.
- Atrybuty
Przykłady
W poniższym przykładzie kodu pokazano, jak używać CellSpacing właściwości do odstępowania komórek RadioButtonList kontrolki na 10 pikseli.
<%@ Page Language="C#" AutoEventWireup="True" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>RadioButtonList.CellSpacing Example</title>
</head>
<body>
<asp:RadioButtonList id="RadioButtonList2"
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>
</body>
</html>
<%@ Page Language="VB" AutoEventWireup="True" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>RadioButtonList.CellSpacing Example</title>
</head>
<body>
<asp:RadioButtonList id="RadioButtonList2"
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>
</body>
</html>
Uwagi
Ta właściwość ma zastosowanie tylko wtedy, gdy właściwość jest ustawiona RepeatLayout na RepeatLayout.Table.
Ta właściwość służy do kontrolowania odstępów między poszczególnymi komórkami w tabeli. Ta właściwość jest stosowana zarówno w pionie, jak i w poziomie.