Page 1 of 1

Bug in TXLSRow.SetHeight

Posted: Fri Jul 12, 2013 1:00 pm
by ich947
I think that I´ve found a bug in TXLSRow.SetHeight.

If I set the Height-Property of a Row-Item, the Height keeps unchanged.
After a few attempts to set the height with another procedure I watched into the source code.

Code: Select all

if FRowItem <> Nil then
  begin
     FRowItem.Height := AValue;
     FRowItem.Options := FRowItem.Options + [xroCustomHeight];
  end
else if ...
I´ve added the second line within the if-block, and then it works.
I´ve found that line in the followed else-if-block. I think that line has to be executed in both cases, and not only in the else-if.

Could you please fix this in the next release?
Or am I wrong with my assumption?

Re: Bug in TXLSRow.SetHeight

Posted: Mon Aug 26, 2013 7:38 am
by ich947
We are still unable to change the height of a row.
Could you please check our issue?

Re: Bug in TXLSRow.SetHeight

Posted: Tue Aug 27, 2013 1:33 pm
by larsa
Hello

I can't find any problems when setting the row height. Please download the lates update of the component.

Re: Bug in TXLSRow.SetHeight

Posted: Wed Aug 28, 2013 12:42 pm
by ich947
Ok, I could find out what the problem is.
It has something to do with the WrapText-Property of a Cell within the concerning Row.

My code looked like this:

Code: Select all

XLS.Sheets[0].Cell[x, y].WrapText := True;
XLS.Sheets[0].Rows[y].Height := 4711;
How I described in my first post, the height kept unchanged.

I tested some things and could finally found out what the origin of my problem is.
If the WrapText-property was set after the row-height, it works perfectly:

Code: Select all

XLS.Sheets[0].Rows[y].Height := 4711;
XLS.Sheets[0].Cell[x, y].WrapText := True;
In my application it´s regardless if I set the wraptext before, or after I had changed the row-height.
So my problem is now solved.

But it´s a strange phenomenon.