Hi Chris. It is very simple to do this kind of grid:
Align the grid to panel. Use the OnResize to find out when the grid/panel has changed. Calculate how many rows fit in grid's ClientHeight (use DefaultRowHeight for this). If there are less rows than the result you just calculated, add more rows . Do the same for columns. Here is another idea: Create a BIG number of rows and columns. So, no matter how the user will resize the grid, it will be filled with cells and you have to write no line of code. I don't know if this fits your needs/project's restrictions but it was just an idea. Chris Stebbing wrote: > Hi All, > > I have Delphi 2005 (with the Jedi components installed as well). I > would like a grid (either stringgrid or dataaware grid) that will > automatically size itself to a panel. If the user resizes the > form/panel I want it to auto-configure the number of rows and columns > to fit within the allocated space, and add scrollbars if necessary. > > Does such a beast exist? > > If not, any ideas on the best way to go about doing something like this? > > Cheers, > Chris. > > _______________________________________________ > Delphi mailing list -> [email protected] > http://www.elists.org/mailman/listinfo/delphi > > _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

