|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
changing rows in a multiline textboxI have a situation where I have a textbox that by default only displays 2 rows of text at a time (textbox.rows = 2). On a link button click, I am supposed to expand the textbox to show all the data it contains but there are a number of problems to work through: - the text box is in a table and textbox's width is set to 100% - a "line" of text could contain a <CR><LF> or could wrap around to the next line - the font characteristics may change depending on the client's preferences So, somehow I need to calculate how many rows are required to display all of the text without the need for scroll bars and then set the rows property to that number. Does anyone have an idea how to handle this? Has anyone done this before? Thanks, Carlo. Carlor,
Look at the replys in "auto-size textbox " in this forum Posted 10/19/2006. also look at these sites http://www.fmsinc.com/free/NewTips/NET/NETtip45.asp http://www.thescripts.com/forum/thread382545.html I hope these are helpfull Jerry -- Show quoteHide quoteJerry "carlor" wrote: > Hi there, > > I have a situation where I have a textbox that by default only displays 2 > rows of text at a time (textbox.rows = 2). On a link button click, I am > supposed to expand the textbox to show all the data it contains but there are > a number of problems to work through: > > - the text box is in a table and textbox's width is set to 100% > - a "line" of text could contain a <CR><LF> or could wrap around to the next > line > - the font characteristics may change depending on the client's preferences > > So, somehow I need to calculate how many rows are required to display all of > the text without the need for scroll bars and then set the rows property to > that number. > > Does anyone have an idea how to handle this? Has anyone done this before? > > Thanks, > > Carlo. Thanks for your help Jerry!
Carlo. Show quoteHide quote "Jerry C" wrote: > Carlor, > > Look at the replys in "auto-size textbox " in this forum Posted 10/19/2006. > > also look at these sites > > http://www.fmsinc.com/free/NewTips/NET/NETtip45.asp > > http://www.thescripts.com/forum/thread382545.html > > I hope these are helpfull > > Jerry > -- > Jerry > > > "carlor" wrote: > > > Hi there, > > > > I have a situation where I have a textbox that by default only displays 2 > > rows of text at a time (textbox.rows = 2). On a link button click, I am > > supposed to expand the textbox to show all the data it contains but there are > > a number of problems to work through: > > > > - the text box is in a table and textbox's width is set to 100% > > - a "line" of text could contain a <CR><LF> or could wrap around to the next > > line > > - the font characteristics may change depending on the client's preferences > > > > So, somehow I need to calculate how many rows are required to display all of > > the text without the need for scroll bars and then set the rows property to > > that number. > > > > Does anyone have an idea how to handle this? Has anyone done this before? > > > > Thanks, > > > > Carlo.
implicit vs explicit localization
AccessDataSource - how to get access to the retrieved data? Adding Web Control How can I find the datakey of currently selected row? Help! Menu control not rendering properly on production Gridview: Edit row validation sqldatasource and connection exception handling localization for all MS web controls email sending twice Trigger an Insert on a FormView control |
|||||||||||||||||||||||