Minecraft (04.07.2012)
- 
	04.07.2012, 16:25 #1U-Labs Routinier    
 - Registriert seit
- 25.11.2011
- Beiträge
- 280
- Blog Entries
- 13
 Thanked 56 Times in 39 Posts Textformatierungen in RichTextBox Textformatierungen in RichTextBoxHallo! 
 
 Ich programmiere gerade einen Chat in C# und möchte eine RichTextBox als Chatverlauf benutzen.
 Der Text soll natürlich nicht immer gleich sein sondern formatiert (z.B. den der etwas schreibt fett, verschiedene Farben etc).
 Wie geht das?
 
- 
	04.07.2012, 16:28 #2Projektleitung    
 - Registriert seit
- 15.11.2011
- Beiträge
- 8.449
- Blog Entries
- 5
 Thanked 9.518 Times in 3.333 Posts AW: Textformatierungen in RichTextBox AW: Textformatierungen in RichTextBoxFür einfache Formatierungen kannst du den Coursor entsprechend positionieren und mit SelectionFont die Schrift sowie den Schriftstyl ändern. 
 Ansonsten RTF benutzen:
 
 Rich Text Format - Wikipedia, the free encyclopediaAs an example, the following RTF code:
 is a document which would be rendered like this when read by a program that supports RTF:Code:{\rtf1\ansi{\fonttbl\f0\fswiss Helvetica;}\f0\pard This is some {\b bold} text.\par }
 
 This is some bold text.
 
 Braces ({ and }) define a group; groups can be nested. A backslash (\) starts an RTF control code. A valid RTF document is a group that starts with the \rtf control code.
 
 In the example above, the \b control code invokes boldface type; the example uses a group to limit the scope of the boldface control code. All other text characters will be rendered as plain text. The \par control code indicates the end of a paragraph.
 Gibt auch fertige Parser: RichText Builder (StringBuilder for RTF) - CodeProject
 
 Kannst aber auch das WebBrowser-Control nutzen und alles mit CSS formatieren, ist einfacher und flexibler.
 
 
- 
	The Following User Says Thank You to DMW007 For This Useful Post:
 
Ähnliche Themen
- 
  VB.Net Richtextbox einzelne Zeile Leerzeichen entfernenVon One Way im Forum .NetAntworten: 0Letzter Beitrag: 10.03.2013, 18:05
- 
  [HTML Tutorial] #3 - TextformatierungenVon Comu im Forum HTMLAntworten: 0Letzter Beitrag: 17.07.2012, 11:57
- 
  C# Richtextbox AlternativeVon GXC1 im Forum .NetAntworten: 4Letzter Beitrag: 22.06.2012, 00:03
- 
  VB.Net [Problem] - Richtextbox - Farbig speichern als rtfVon Pyromane im Forum .NetAntworten: 1Letzter Beitrag: 10.04.2012, 16:19
- 
  VB.Net Richtextbox & button pro klick = 1 textVon getsha im Forum .NetAntworten: 1Letzter Beitrag: 30.01.2012, 16:46
Diese Seite nutzt Cookies, um das Nutzererlebnis zu verbessern. Klicken Sie hier, um das Cookie-Tracking zu deaktivieren.
 
									 
														 
														 
					
					
					
						 Zitieren
  Zitieren