RadioButtonList.CellPadding 속성

정의

테이블 셀의 테두리와 내용 간의 거리(픽셀 단위)를 가져오거나 설정합니다.

public:
 virtual property int CellPadding { int get(); void set(int value); };
[System.ComponentModel.Bindable(true)]
public virtual int CellPadding { get; set; }
public virtual int CellPadding { get; set; }
[<System.ComponentModel.Bindable(true)>]
member this.CellPadding : int with get, set
member this.CellPadding : int with get, set
Public Overridable Property CellPadding As Integer

속성 값

Int32

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

특성

예제

다음 코드 예제에서는 속성을 사용 하 여 CellPadding 10 픽셀 컨트롤의 셀을 RadioButtonList 패딩 하는 방법을 보여 줍니다.

<%@ Page Language="C#" AutoEventWireup="True" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>RadioButtonList.CellPadding Example</title>
</head>
<body>

<asp:RadioButtonList id="RadioButtonList1"
      CellPadding = "10"
      RepeatLayout="Table" 
      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.CellPadding Example</title>
</head>
<body>

<asp:RadioButtonList id="RadioButtonList1"
      CellPadding = "10"
      RepeatLayout="Table" 
      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.Table설정된 경우에만 RepeatLayout 적용됩니다.

이 속성을 사용 하 여 셀의 내용과 셀의 테두리 사이의 간격을 제어 합니다.

지정한 안쪽 여백 양이 셀의 네 면 모두에 추가됩니다. 표에서 가장 높은 셀의 높이와 표에서 가장 넓은 셀의 너비를 사용합니다. 결과 셀 크기는 표의 모든 셀에 균일하게 적용됩니다. 개별 셀 크기를 지정할 수 없습니다.

적용 대상

추가 정보