Autor Beitrag
OliverN_26
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 252

Win7 64-Bit, WinXP SP3
Delphi 7 Enterprise
BeitragVerfasst: Di 25.12.07 12:40 
Hi!

Wie kann ich in einem StringGrid eine Zelle vertikal zentrieren?
Hab schon viel gesucht, aber man findet da nicht wirklich was brauchbares.
Hab folgenden Code, aber auf "VT_CENTER" reagiert er nicht wirklich. Fehlt da ne uses?

ausblenden Quelltext
1:
DrawText(Canvas.Handle,PChar(s),Length(s),Rect,DT_CENTER+DT_VCENTER);					


Danke
Jerk
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 251

Vista Ultimate, Ubuntu
Turbo Delphi 2006
BeitragVerfasst: Di 25.12.07 13:04 
evtl so?
ausblenden Delphi-Quelltext
1:
  DrawText(StringGrid1.Canvas.Handle, PChar(s), Length(s), Rect, DT_SINGLELINE or DT_Center or DT_VCENTER);					
OliverN_26 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 252

Win7 64-Bit, WinXP SP3
Delphi 7 Enterprise
BeitragVerfasst: Di 25.12.07 13:24 
Shit ...
Schön, wenn es immer so einfach wäre :-)

1000 Dank