C interlinea su RectangleF

mercoledì 06 giugno 2012 - 21.55
Tag Elenco Tags  C#

secks Profilo | Senior Member

Salve a tutti.

Utilizzando la RectangleF ho impostato uno spazio per scrivere un testo in un documento.
Se però il testo supera la lunghezza el quadrato impostato scrive una seconda riga, fin qui tutto ok.
Ho notato però che c'è uno spazio enorme tra una riga e l'altra, penso che dipenda dal tipo/dimensione del carattere.
Finora non l'ho trovato ... qualcuno sa se esiste qualche parametro per diminuire l'altezza dell'interlinea?

rectF1 = new RectangleF(R - 80, C, 170, 480);
stringFormat = new StringFormat();
//stringFormat.FormatFlags = StringFormatFlags.DirectionVertical;
stringFormat.FormatFlags = StringFormatFlags.DirectionVertical | StringFormatFlags.DirectionRightToLeft;
//stringFormat.FormatFlags = StringFormatFlags.
// Center each line of text.
stringFormat.Alignment = StringAlignment.Center;
// Center the block of text (top to bottom) in the rectangle.
stringFormat.LineAlignment = StringAlignment.Center;
s = (string)t.Rows[i]["eti_tx1"];
//s = "1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0";
//e.Graphics.DrawString(s, FonDe1, Brushes.Black, R, C, stringFormat);
e.Graphics.DrawString(s, FonDe1, BruDe1, rectF1, stringFormat);


Saluti e grazie.
Paolo.
Partecipa anche tu! Registrati!
Hai bisogno di aiuto ?
Perchè non ti registri subito?

Dopo esserti registrato potrai chiedere
aiuto sul nostro Forum oppure aiutare gli altri

Consulta le Stanze disponibili.

Registrati ora !
Copyright © dotNetHell.it 2002-2023
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5