RadioButtonList.CellSpacing Propiedad
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Obtiene o establece la distancia en píxeles entre celdas contiguas.
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
Valor de propiedad
Distancia en píxeles entre celdas contiguas de la tabla. El valor predeterminado es -1, que indica que esta propiedad no se estableció.
- Atributos
Ejemplos
En el ejemplo de código siguiente se muestra cómo usar la CellSpacing propiedad para espaciar las celdas de un RadioButtonList control de 10 píxeles.
<%@ 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>
Comentarios
Esta propiedad solo se aplica cuando la propiedad RepeatLayout está establecida en RepeatLayout.Table.
Utilice esta propiedad para controlar el espaciado entre celdas individuales de la tabla. Esta propiedad se aplica tanto vertical como horizontalmente.