Home Page
Articoli
Tips & Tricks
News
Forum
Archivio Forum
Blogs
Sondaggi
Rss
Video
Utenti
Chi Siamo
Contattaci
Username:
Password:
Login
Registrati ora!
Recupera Password
Home Page
Stanze Forum
App. WinForms / WPF .NET
C interlinea su RectangleF
mercoledì 06 giugno 2012 - 21.55
Elenco Threads
Stanze Forum
Aggiungi ai Preferiti
Cerca nel forum
Elenco Tags
C#
secks
Profilo
| Senior Member
442
messaggi | Data Invio:
mer 6 giu 2012 - 21:55
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.
Torna su
Stanze Forum
Elenco Threads
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 !