Link to home
Start Free TrialLog in
Avatar of Andrew Crofts
Andrew CroftsFlag for Ukraine

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
Avatar of Espavo
Espavo
Flag of South Africa image

Have you specified their widths, etc.?
style="width: 100px;"
SOLUTION
Avatar of Faheem Shaikh
Faheem Shaikh
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of vs1784
vs1784

Post some code?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Andrew Crofts

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.

    <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>

Open in new window

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>

Open in new window

So I need to work out the design time width that gives me the required run time width?

Why is it not wysiwyg?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial