Autor Beitrag
JRegier
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1268

Win XP Home, Prof, 2003 Server
D6 Enterprise
BeitragVerfasst: Fr 04.11.05 10:32 
Hi,

wie ist es wenn ich TextWidth prüffen will und im Text sind die Zeichen #13#10
also Enter Zeichen wird es dennoch für den GesamtText berechnet?

Z.B.

Canvas.TextWidth('Hallo,'+#13#10+'Freund');
oder
Canvas.TextWidth('Hallo, Freund');

führt zum selben Ergebniss oder?
azubi_20
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 593

WinXP SP2, Ubuntu 8.4
D7 Enterp., D2005 Prof., Java (Eclipse 3.4.0)
BeitragVerfasst: Fr 04.11.05 11:28 
probiers doch aus :

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
Application.MessageBox('mit Zeilenumbruch : ' +  _
                        inttostr(Canvas.TextWidth('Hallo,'+#13#10+'Freund')) + #13#10+ _
                       'ohne Zeilenumbruch : ' +  _
                        inttostr(Canvas.TextWidth('Hallo, Freund')),
                       'Test', mb_OK);
JRegier Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1268

Win XP Home, Prof, 2003 Server
D6 Enterprise
BeitragVerfasst: Fr 04.11.05 18:04 
Hi, das habe ich auch schon getan, mußte nur wieder mal hier reinschreiben!

Also doch ein Unterschied!