Bug in TXLSRow.SetHeight

Questions and answers on how to use XLSReadWriteII 5.
Post Reply
ich947
Posts: 4
Joined: Fri Jul 12, 2013 12:25 pm

Bug in TXLSRow.SetHeight

Post 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?
ich947
Posts: 4
Joined: Fri Jul 12, 2013 12:25 pm

Re: Bug in TXLSRow.SetHeight

Post by ich947 »

We are still unable to change the height of a row.
Could you please check our issue?
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Bug in TXLSRow.SetHeight

Post by larsa »

Hello

I can't find any problems when setting the row height. Please download the lates update of the component.
Lars Arvidsson, Axolot Data
ich947
Posts: 4
Joined: Fri Jul 12, 2013 12:25 pm

Re: Bug in TXLSRow.SetHeight

Post 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.
Post Reply