Re: [Lazarus] Strange behavior of AutoSizeColumn in StringGrid

2015-05-06 Thread Valdas Jankūnas

2015.05.06 01:52, Jesus Reyes rašė:



Well, apparently it could be a bug with a side effect :).

It seems the Multiline property is a Column's Title property not a column 
property
however it is treated as if it is a column property, something that should only 
affect
the title cell but it actually affects the whole column. That's the side effect.

If that is the intended behaviour (Multiline title property is a contribution, 
Werner?)
then it's OK to me, in that case please try the attached patch and write back 
your results,
here I tested under Windows and it seems to work fine.

Jesus Reyes A.



tested on Linux: AutosizeColumn[s] stops working. But if I add line 
aRect := Rect(0, 0, High(integer), High(integer)); before 
DrawText... then it works, also bug is gone.


--
  Valdas Jankūnas

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Strange behavior of AutoSizeColumn in StringGrid

2015-05-06 Thread Jesus Reyes
2015.05.06 01:52, Jesus Reyes ra

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Strange behavior of AutoSizeColumn in StringGrid

2015-05-06 Thread Jesus Reyes A.
On Wed, 06 May 2015 04:15:43 -0500, Valdas Jankūnas zmu...@gmail.com  
wrote:



2015.05.06 01:52, Jesus Reyes rašė:

If that is the intended behaviour (Multiline title property is a  
contribution, Werner?)
then it's OK to me, in that case please try the attached patch and  
write back your results,

here I tested under Windows and it seems to work fine.



tested on Linux: AutosizeColumn[s] stops working. But if I add line  
aRect := Rect(0, 0, High(integer), High(integer)); before  
DrawText... then it works, also bug is gone.




I'm sorry for my previous two messages. I hope this time it will go ok.
the following is what I replied in both cases.
- - - - - - - - - -

Weird, now I have tested in both Linux and Mac and it works fine
without your change..

Anybody else?

Jesus Reyes A.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Strange behavior of AutoSizeColumn in StringGrid

2015-05-06 Thread Jesus Reyes
2015.05.06 01:52, Jesus Reyes ra

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Strange behavior of AutoSizeColumn in StringGrid

2015-05-05 Thread Jesus Reyes
El mar 5-may-15, Valdas Jankūnas zmu...@gmail.com escribió:

  Asunto: [Lazarus] Strange behavior of AutoSizeColumn in StringGrid
  A: General mailing list laza...@lazarus.freepascal.org
  Fecha: martes, 5 de mayo de 2015, 14:43
  
  Hello,
  
  situation: GridColumn.Multiline is TRUE and one of
  StringGrid's cell has 
  multiline text. If I perform StringGrid.AutosizeColumn[s]
  then column 
  width become like all text of cell was in single line
  (attached test 
  project: try to press button several times).
  
    Is this a Bug?
  

Well, apparently it could be a bug with a side effect :).

It seems the Multiline property is a Column's Title property not a column 
property
however it is treated as if it is a column property, something that should only 
affect
the title cell but it actually affects the whole column. That's the side effect.

If that is the intended behaviour (Multiline title property is a contribution, 
Werner?) 
then it's OK to me, in that case please try the attached patch and write back 
your results,
here I tested under Windows and it seems to work fine.

Jesus Reyes A.

autosizemultiline.diff
Description: Binary data
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Strange behavior of AutoSizeColumn in StringGrid

2015-05-05 Thread Valdas Jankūnas

Hello,

situation: GridColumn.Multiline is TRUE and one of StringGrid's cell has 
multiline text. If I perform StringGrid.AutosizeColumn[s] then column 
width become like all text of cell was in single line (attached test 
project: try to press button several times).


 Is this a Bug?


--
  Valdas Jankūnas

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus