RadioButtonList.CellSpacing Propriété

Définition

Obtient ou définit la distance (en pixels) entre les cellules adjacentes du tableau.

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

Valeur de propriété

Distance (en pixels) entre les cellules adjacentes du tableau. La valeur par défaut est -1 (propriété non définie).

Attributs

Exemples

L’exemple de code suivant montre comment utiliser la CellSpacing propriété pour espacer les cellules d’un RadioButtonList contrôle de 10 pixels.

<%@ 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>

Remarques

Cette propriété s'applique uniquement lorsque la propriété RepeatLayout a la valeur RepeatLayout.Table.

Utilisez cette propriété pour contrôler l’espacement entre les cellules individuelles du tableau. Cette propriété est appliquée verticalement et horizontalement.

S’applique à

Voir aussi