Bagikan melalui


RadioButtonList.CellPadding Properti

Definisi

Mendapatkan atau mengatur jarak (dalam piksel) antara batas dan konten sel tabel.

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

Nilai Properti

Jarak (dalam piksel) antara batas dan konten sel tabel. Defaultnya adalah -1, yang menunjukkan bahwa properti ini tidak diatur.

Atribut

Contoh

Contoh kode berikut menunjukkan cara menggunakan CellPadding properti untuk mengayuh sel RadioButtonList kontrol dengan 10 piksel.

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

Keterangan

Properti ini hanya berlaku ketika RepeatLayout properti diatur ke RepeatLayout.Table.

Gunakan properti ini untuk mengontrol penspasian antara konten sel dan batas sel.

Jumlah padding yang ditentukan ditambahkan ke keempat sisi sel. Ini menggunakan tinggi sel tertinggi dalam tabel dan lebar sel terluas dalam tabel. Ukuran sel yang dihasilkan diterapkan secara seragam ke semua sel dalam tabel. Ukuran sel individual tidak dapat ditentukan.

Berlaku untuk

Lihat juga