View Single Post
  #6  
Old 15 Jan 2009, 07:45
sparklywater sparklywater is offline
 
Join Date: Jun 2008
Originally Posted by Dismounted View Post
However, I don't think you can fetch the width of a displayed cell in Javascript. The width as defined in the source code may be fetchable, but the width (in pixels) that it is currently displayed cannot.
Well, it doesn't necessarily have to determine the width of the cell in pixels. I was wondering if there is a function which can determine when a text is flowing onto a new line, because this is what happens when the text hits the end of a cell, it moves onto a new line on the screen. So there won't be any need to work out the width of the cell. If a function can tell that the width of the cell has caused the text to flow onto another line, it can trim the string at that point to make it fit on one line.

Not sure if this is too much to ask, but may be possible somehow.
Reply With Quote