Page 1 of 1

TGridShape individual Cell Width

Posted: Tue Nov 04, 2008 12:37 pm
by 7722485
In an multicolumn GridShape I try to give each Column an individual width.

I did insert in the TeeTree2New Example the following lines at the FormCreate of unit GridShape.pas:

Cells[0,0].width := 200;
Cells[0,1].width := 300;
Cells[0,2].width := 400;
Cells[1,0].width := 200;
Cells[1,1].width := 300;
Cells[1,2].width := 400;
Cells[2,0].width := 200;
Cells[2,1].width := 300;
Cells[2,2].width := 400;


but all Cells have still the same width .

How can I set individual widths for each column ?

Posted: Sat Nov 15, 2008 1:08 pm
by Tom
Hi,

Unfortunately, there is no functionality in GridShape which supports your request. As it it implemented now, you can't assign custom widths or heights. At the moment it works as follows:

Changing the width/height of a cell has no effect, since it is automatically calculated:

1) AutoSize off: The width of a cell = The width of the grid divided by the amount of columns
1) AutoSize on: The max width of one of de cells in the same column determines the width of all the cells in that column. The width of each cell is calculated from it's contents

Regards,
Tom