Board index » delphi » Change column size of SQL-DBGrid

Change column size of SQL-DBGrid

Hi.

On my application is a DBGrid linked to an SQL-statement. Most of the
fields in the database have a length of 50 to 250 characters, but mostly
only the first 20 are used. So on screen (and on the printer) the
columns are much too wide. How can I narrow them down (autosize?!) or
shrink-to-fit?

Thanxx in advance

.\\

Maurice Pasman, Webmaster The Twilight Site

 ___________________________________________________________
      Micro$oft: Where the hell do I have to go today?

 

Re:Change column size of SQL-DBGrid


I think your answer lies in the TField DisplayWidth property.
Instantiate your TFields for you query in the query's field editor, and
set the DisplayWidth in the Object Inspector while you have a field
selected.

Other Threads