Results 1 to 4 of 4

Thread: [RESOLVED] Multiline TextBox fill entire container

  1. #1
    PowerPoster JuggaloBrotha's Avatar
    Join Date
    Sep 05
    Location
    Lansing, MI; USA
    Posts
    3,787

    Resolved [RESOLVED] Multiline TextBox fill entire container

    I have a table where I have a cell that spans all of the rows and it contains a Multiline TextBox, what I would like is that textbox to fill the entire cell regardless of how big it is.

    I tried this:
    Code:
    <td rowspan="14"><asp:TextBox ID="AppInfoTextBox" TextMode="MultiLine" style="width:100&#37;;height:100%;" runat="server" /></td>
    Here's how it's rendering:
    Name:  Multiline_TextBox.png
Views: 295
Size:  7.3 KB

    I don't know at coding time what the size will be, the page is opened in a popup window and the user can re-size the window so I need it to be whatever the cell size is.
    Currently using: VS 2010 Ultimate on Win7 Ultimate x64.



    CodeBank: All Threads • Colors ComboBox • Fading & Gradient Form • MoveItemListBox/MoveItemListView • MultilineListBox • MenuButton • ToolStripCheckBox • Start with Windows

  2. #2
    King of sapila
    Join Date
    Oct 06
    Location
    Greece
    Posts
    3,520

    Re: Multiline TextBox fill entire container

    Hi.Your problem is that td will not give percentage out.If you use pixels you will see that it expands.
    What i think you can do is, since your are using rowspan, try to set the exact same rowspan of the td to the textbox rows like this:
    Code:
     <table cellpadding="0" cellspacing="0" style="width:100%;height:100%;background:#ccc;">
      <tr>
         <td>sdfsfdfdsfsd<br />
            sfd<br />
            sdfd<br />
            <br />
           
            <br />
            sd<br />
            </td>
        <td rowspan="14"><asp:TextBox ID="AppInfoTextBox" TextMode="MultiLine" Rows="14" style="width:100%" runat="server" /></td>
      </tr>
    </table>
    These are assumptions i haven't actually tested an expanding textbox inside a td.Let me know how this turns out.
    Slow as hell.

  3. #3
    PowerPoster JuggaloBrotha's Avatar
    Join Date
    Sep 05
    Location
    Lansing, MI; USA
    Posts
    3,787

    Re: [RESOLVED] Multiline TextBox fill entire container

    Thanks man, it's close enough I guess.

    It just seems odd that you can set a width of 100&#37;, but don't bother with the css height property because the multiline textbox ignores it. I don't see why you can't have a TB resize itself with it's container.
    Currently using: VS 2010 Ultimate on Win7 Ultimate x64.



    CodeBank: All Threads • Colors ComboBox • Fading & Gradient Form • MoveItemListBox/MoveItemListView • MultilineListBox • MenuButton • ToolStripCheckBox • Start with Windows

  4. #4
    King of sapila
    Join Date
    Oct 06
    Location
    Greece
    Posts
    3,520

    Re: [RESOLVED] Multiline TextBox fill entire container

    Well. me either.May exist a better solution but i don't have one
    Slow as hell.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •