TGridShape individual Cell Width

TeeTree VCL for Borland Delphi and C++ Builder.
Post Reply
Posts: 3
Joined: Fri Nov 15, 2002 12:00 am

TGridShape individual Cell Width

Post by ouzo » Tue Nov 04, 2008 12:37 pm

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 ?

Posts: 211
Joined: Mon Dec 01, 2003 5:00 am

Post by tom » Sat Nov 15, 2008 1:08 pm


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


Post Reply