我在我的应用程序中使用单选按钮是否有任何可能的方法将文本从左侧移到右侧
答案 0 :(得分:5)
将TextAlign
属性设置为它所属的列表中的“右”。
见这里:http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.radiobuttonlist.textalign.aspx
示例(在VS中使用标准WebApplication并在default.aspx中包含以下内容):
<asp:RadioButtonList id="RadioButtonList1"
RepeatDirection="Vertical"
RepeatLayout="Table"
TextAlign="Right"
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>
将TextAlign设置为Left的结果是: