Topic: How to have the colunms extended ?

Hello
All i want to know is in my question :

is it possible to have the columns extended in the tablegrid when i am maximizing my form ?
because columns in my tablegrid are not extended.
Do you know how to....?

thx

-- SkwarNX --

Re: How to have the colunms extended ?

Hello,


You can extend columns using mouse.


or using this script, let's say you have three columns:

procedure Form1_TableGrid1_OnChange (Sender: string);
begin
    Form1.TableGrid1.Columns[0].Options := Form1.TableGrid1.Columns[0].Options + coAutoSize;
    Form1.TableGrid1.Columns[1].Options := Form1.TableGrid1.Columns[1].Options + coAutoSize;
    Form1.TableGrid1.Columns[2].Options := Form1.TableGrid1.Columns[2].Options + coAutoSize;
end;


Also you can enable auto fit columns width, depending on their content, example:

procedure Form1_TableGrid1_OnChange (Sender: string);
begin
   Form1.TableGrid1.BestFitColumns(bfBoth);
end;
Dmitry.

Re: How to have the colunms extended ?

hello Dmitry !!

Very nice !!
thank you for quick answer.

-- SkwarNX --