Autor Beitrag
Klabautermann
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Veteran
Beiträge: 6366
Erhaltene Danke: 60

Windows 7, Ubuntu
Delphi 7 Prof.
BeitragVerfasst: Di 18.11.03 10:44 
Hallo,

kann mir jemand sagen, ob/wie es möglich ist, die Zeilenhöhe bei DBGrids zu ändern?

Gruß
Klabautermann
Michael Stenzel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 133


D3 Prof, D7 PE
BeitragVerfasst: Mi 19.11.03 00:55 
Hallo.

Ja , es ist möglich.
Zuerst leites Du eine neue Klasse von TDBGrid ab.
Danach mußen den privaten Property RowHeights veröffentlichen.
Durch einfaches Typecasting kannst Du dann die Zellenhöhe einstellen.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
Type
   TMyDBGrid = class(TDBGrid)
    public
              property RowHeights;
    end;

// ....

   TMyDBGrid(dbgrid1).RowHeights[1]:= 30;

// ....


Gruß
Michael.
Klabautermann Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Veteran
Beiträge: 6366
Erhaltene Danke: 60

Windows 7, Ubuntu
Delphi 7 Prof.
BeitragVerfasst: Do 20.11.03 12:43 
Danke Michael,

das war es wonach ich gesucht habe, zumindest in verbingung mit der DefaultRowHeight.

Gruß
Klabautermann