RadioButtonList.CellSpacing 속성

정의

인접한 테이블 셀 간의 거리(픽셀 단위)를 가져오거나 설정합니다.

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

속성 값

인접한 테이블 셀 간의 거리(픽셀 단위)입니다. 기본값은 -1로, 이 속성이 설정되지 않았음을 나타냅니다.

특성

예제

다음 코드 예제를 사용 하는 방법을 보여 줍니다.는 CellSpacing 10 픽셀 간격으로 컨트롤의 셀 간격을 RadioButtonList 속성입니다.

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

설명

이 속성은 속성이 로 RepeatLayout 설정된 RepeatLayout.Table경우에만 적용됩니다.

테이블의 개별 셀 사이의 간격을 제어하려면 이 속성을 사용합니다. 이 속성은 세로 및 가로로 적용됩니다.

적용 대상

추가 정보