ASP.NET TextAlign 属性

定義と用法

TextAlign 属性は、CheckBoxList 項目のテキストのテキストアライメントを取得または設定するために使用されます。

構文

<asp:CheckBoxList TextAlign="align" runat="server">
some content
</asp:CheckBoxList>
属性 説明
align

リスト項目のテキストのアライメントを指定します。

可能な値:

  • Left
  • Right (デフォルト)

以下の例では、CheckBoxList コントロールの TextAlign 属性を "Left" に設定しています:

<form runat="server">
<asp:CheckBoxList id="rb1" runat="server"> TextAlign="Left">
Some content
</asp:CheckBoxList>
</form>

CheckBoxList コントロールの TextAlign 属性を設定する