Now wordwrap and HTML

I have a tadvstringgrid to display HTML formated data. Now I want to avoid wordwrap and set wordwrap to false, but it is ignored. The text in the cells is wordwrapped.

The problem is, that I display multiline text and want to be sure, that at least the beginning of every line is displayed. I set the rowheight at a value, that for example 3 lines could be displayed. Now, when I have a long first line, that is wordwraped, it could be, that this line is displayed over the 3 lines and the start of the 2nd and 3rd line is not displayed.

How can I display HTML formatted text in a grid without wordwrap?

You can call grid.AutoSizeColumns() / AutoSizeRows() 


procedure TForm4.FormCreate(Sender: TObject);


  AdvStringGrid1.WordWrap := false;

  AdvStringGrid1.Multilinecells := true;

  Advstringgrid1.Cells[1,1] := 'very long line1 <b>blablabla</b>'#13#10'line2'#13#10'line3';




Thanks for the answer, but I now the Autosize functions, but that is not what I want. I have a grid, where I allready autosize the columns to fit on the form. I have a fixed number of columns and want to display all columns in the same size and all columns have to be visible without using a scorllbar. So the size of the columns is allready calculated by the width of the grid divided by the number of columns. What I want is, that the first part text of every line in a cell is displayed and every line is cut off on the right side of the cell.

Yesterday I did a workaround by removing HTML formatting. Fortunately I only used <B> that I could replace by using the fontstyle fsbold for that cell in the cellproperties, but I have other cells where I use HTML tags, where I do not have suc h an easy workaround. So I would like to be able to cut off Text in HTML formated cells.

Sorry, the HTML engine will always perform wordwrap. There is currently not a setting to disable wordwrap on HTML formatted text.

ok, thank you. So I stick with the workaround