开发者

ASP.NET Panels & Dynamic Controls

开发者 https://www.devze.com 2023-03-01 23:13 出处:网络
I have a simple form, with a table (from the standard toolbox - 3 X 4). In one of the cells I have a panel, which I add textboxes to dynamically at runtime.

I have a simple form, with a table (from the standard toolbox - 3 X 4). In one of the cells I have a panel, which I add textboxes to dynamically at runtime.

Problem is this: How can I hav开发者_如何学Ce the panel LEFT-justified in the cell, yet have my textboxes RIGHT-justified within the panel? (and, possibly the text right-justified inside the textboxes)

Any thoughts would be greatly appreciated!

Thanks, Jason


Set the panels's HorizontalAlign property to HorizontalAlign.Right

As for the TextBox, you can do

dynamicTextBox.Style.Add("text-align", "right");
0

精彩评论

暂无评论...
验证码 换一张
取 消