delphi - DBAdvGrid RowHeights - alter all rows except 1 -


i'm using following code in customcelldraw event of dbadvgrid(tms) increase row height.

procedure tform1.dbadvgrid1customcelldraw(sender: tobject; canvas: tcanvas;   acol, arow: integer; astate: tgriddrawstate; arect: trect; printing: boolean); begin dbadvgrid1.rowheights[arow]:=120; end; 

how make avoid increasing row 0, 1st row in grid, containing column names/headers? - i'd row remain untouched while rest should resized via above code. should ignore row index 0 , start row index 1

it this:

procedure tform1.dbadvgrid1customcelldraw(sender: tobject; canvas: tcanvas;    acol, arow: integer; astate: tgriddrawstate; arect: trect; printing: boolean); begin   if arow > 0     dbadvgrid1.rowheights[arow] := 120; end; 

but not modify row heights drawing event. such event triggered frequently, , used exclusively content painting, not adjusting content size. what's worse, if e.g. allowed row sizing , user try setup row height, in turn trigger event change height back, you'd fighting user.

content sizing should done earlier, this example shows in oncustomcellsize event.

but aim think it's enough set defaultrowheight , fixedrowheight properties no additional code.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -