Resize the columns stringgrid in delphi -


i want stringgrid. change size of columns.

this stringgrid connected database. however, tried different methods; column did not change. should do?

not sure mean "lengths", i.e. widths or heights.

this code change lefthand column's width:

procedure tform1.button1click(sender: tobject); begin   sg1.colwidths[0] := sg1.colwidths[0] + 10; end; 

this link show how "autosize" grid's column widths:

how make stringgrid's columns fit grid's width?

in case meant heights of cells, can row @ time this:

procedure tform1.btnheightclick(sender: tobject); begin   sg1.rowheights[1] := sg1.rowheights[1] + 10;  //  nb row 0 column header end; 

or, can set height of rows @ once this:

procedure tform1.btnheightsclick(sender: tobject); begin   sg1.defaultrowheight := sg1.defaultrowheight + 10; end; 

Comments

Popular posts from this blog

android - net_scheduler holding wakelock -

sql - MySQL : Getting Entries from a many-to-many table -

java - Retrieving data from database using jsp (Hibernate + Spring + Maven) -