RadioButtonList.TextAlign プロパティ
アセンブリ: System.Web (system.web.dll 内)

Dim instance As RadioButtonList Dim value As TextAlign value = instance.TextAlign instance.TextAlign = value
/** @property */ public TextAlign get_TextAlign () /** @property */ public void set_TextAlign (TextAlign value)
TextAlign 値の 1 つ。既定値は Right です。


このプロパティを使用して、オプション ボタンに関連付けられたテキストを左右のどちらに表示するかを指定します。このプロパティを TextAlign.Right に設定すると、テキストはオプション ボタンの右に表示されます。このプロパティを TextAlign.Left に設定すると、テキストはオプション ボタンの左に表示されます。

TextAlign プロパティを使用して、オプション ボタンに関連付けられたテキストを RadioButtonList コントロールの左側に表示する方法を次のコード例に示します。
<%@ Page Language="C#" AutoEventWireup="True" %> <asp:RadioButtonList id=RadioButtonList1 RepeatColumns="2" RepeatDirection="Vertical" RepeatLayout="Table" TextAlign="Left" 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>
<%@ Page Language="JScript" AutoEventWireup="True" %> <asp:RadioButtonList id=RadioButtonList1 RepeatColumns="2" RepeatDirection="Vertical" RepeatLayout="Table" TextAlign="Left" 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>

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


RadioButtonList クラス
RadioButtonList メンバ
System.Web.UI.WebControls 名前空間
TextAlign
その他の技術情報
RadioButton Web サーバー コントロールおよび RadioButtonList Web サーバー コントロール
- RadioButtonList.TextAlign プロパティのページへのリンク