Hi Tony,

I use a TGrid with the Align property set to alClient to fill up its area,
and when the grid changes size, I use

  dgSearch.ColWidths[0]    := 70;
  dgSearch.ColWidths[1]    := dgSearch.Width-60;

to set the two columns to a fixed first size, and all the remainder used
for the right column, except enough space for a scroll bar to pop up
when the grid is big.

Hope that works for you

Rich




---------------------------------------------------


If I put a StringGrid (or similar component) on a form, and then scale
the form (on application startup) according to the screen resolution
being used, then the StringGrid component scales itself as does the
form.  However, the actual cell size does not scale.

So if the grid is made to fit exactly into the control, at the
resolution used for design, then when adjusted for higher screen
resolution the grid will be smaller than the control, which looks
ridiculous as well as leaving the grid very small at very high resolutions.

Of course at the time of scaling the form, it would be possible to scale
the DefaultColWidth and DefaultRowHeight properties.  In most cases this
is an OK workaround for row height but mostly my grids need different
col widths but of course this workaround makes all the col widths equal.

The F1 component scales correctly but that seems to be using a sledge
hammer to crack a nut.  I only need some simple 2 x 10 grids for data
entry, not a spreadsheet.

Does anyone know of a simple alternative workaround or alternative
component?

-- 
Regards,

Tony Foale
EspaƱa / Spain

www.tonyfoale.com
[EMAIL PROTECTED]

_______________________________________________
Delphi mailing list -> Delphi@elists.org
http://www.elists.org/mailman/listinfo/delphi

_______________________________________________
Delphi mailing list -> Delphi@elists.org
http://www.elists.org/mailman/listinfo/delphi

Reply via email to