Aracılığıyla paylaş


RadioButtonList.CellPadding Özellik

Tanım

Kenarlık ile tablo hücresinin içeriği arasındaki uzaklığı (piksel cinsinden) alır veya ayarlar.

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

Özellik Değeri

Kenarlık ile tablo hücresinin içeriği arasındaki uzaklık (piksel cinsinden). Bu özelliğin ayarlanmadığını gösteren -1 varsayılan değeridir.

Öznitelikler

Örnekler

Aşağıdaki kod örneği, bir denetimin CellPadding hücrelerini 10 piksel ile doldurmak için özelliğinin RadioButtonList nasıl kullanılacağını gösterir.

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

Açıklamalar

Bu özellik yalnızca RepeatLayout özelliği olarak ayarlandığında RepeatLayout.Tablegeçerlidir.

Bir hücrenin içeriğiyle hücrenin kenarlık arasındaki boşluğu denetlemek için bu özelliği kullanın.

Belirtilen doldurma miktarı hücrenin dört tarafına da eklenir. Tablodaki en uzun hücrenin yüksekliğini ve tablodaki en geniş hücrenin genişliğini kullanır. Sonuçta elde edilen hücre boyutu tablodaki tüm hücrelere tekdüzen uygulanır. Tek tek hücre boyutları belirtilemez.

Şunlara uygulanır

Ayrıca bkz.