Andrew Crofts
asked on
textboxs change size between design and run time
VS 2008
I have a form with two textboxes and two buttons. the two text boxes are above each other and the buttons side by side below.
The two textboxes are the same width and as wide as the width from left edge of button one to right edge of button two.
When I run it both text boxes become wider. one is a password and this is not as wide as the other text box but both are wider than they were at design time.
Why? How do I fix?
TIA
I have a form with two textboxes and two buttons. the two text boxes are above each other and the buttons side by side below.
The two textboxes are the same width and as wide as the width from left edge of button one to right edge of button two.
When I run it both text boxes become wider. one is a password and this is not as wide as the other text box but both are wider than they were at design time.
Why? How do I fix?
TIA
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Post some code?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This what I have at the moment top
changing it to the second bit make the textboxes stay the same as each other but slightly wider than at design.
I'll try the columns next.
changing it to the second bit make the textboxes stay the same as each other but slightly wider than at design.
I'll try the columns next.
<asp:TextBox ID="txtLogin" runat="server"
style="position:absolute; top: 290px; left: 226px;"></asp:TextBox>
<asp:TextBox ID="txtPassword" runat="server"
style="position:absolute; top: 326px; left: 226px;" TextMode="Password"></asp:TextBox>
*****************************************************************
<asp:TextBox ID="txtLogin" runat="server"
style="position:absolute; top: 290px; left: 226px; width: 128px;"></asp:TextBox>
<asp:TextBox ID="txtPassword" runat="server"
style="position:absolute; top: 326px; left: 226px; width: 128px;" TextMode="Password"></asp:TextBox>
ASKER
This makes them the correct size at design but the expand by different amounts at run time.
<asp:TextBox ID="txtLogin" runat="server" columns="20"
style="position:absolute; top: 290px; left: 226px; "></asp:TextBox>
<asp:TextBox ID="txtPassword" runat="server" columns="20"
style="position:absolute; top: 326px; left: 226px; " TextMode="Password"></asp:TextBox>
ASKER
So I need to work out the design time width that gives me the required run time width?
Why is it not wysiwyg?
Why is it not wysiwyg?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
style="width: 100px;"