Autor Beitrag
vit30
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 38



BeitragVerfasst: Mi 31.03.10 08:33 
Hallo!
Ich möchte das manche(nicht alle) Daten im textBox mit anderem Schrift angezeigt werden.
Mit Eigenschaften von textBox klappt nicht. Bei String habe ich auch nichts passendes gefunden.
Es soll ungefähr so aussehen:
ausblenden C#-Quelltext
1:
textBox.Text = output(//string-Variable) + A(//Variable, die mit anderem Schrift angezeigt werden muss)					

DAnke!
danielf
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1012
Erhaltene Danke: 24

Windows XP
C#, Visual Studio
BeitragVerfasst: Mi 31.03.10 09:20 
Hallo,

das kann das TextBox Control nicht. Dafür brauchst du ein RichTextBox, welches wiederum unterschiedliche Möglichkeiten der Formatierung benötigt. Zum einen kannst du im RTF-Format Formatierung vornehmen oder Mittels Selektion den gewünschten Text auswählen und die Schrift formatieren.

Gruß
vit30 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 38



BeitragVerfasst: Mi 31.03.10 09:38 
AAAAAA :cry:
Ich habe schon ganze Programm mit textBox gemacht!
Kann ich jetzt alles schnell ändern?
Wenn ja, wie?
danielf
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1012
Erhaltene Danke: 24

Windows XP
C#, Visual Studio
BeitragVerfasst: Mi 31.03.10 09:49 
Hmmm... was meinst du mit schnell? Hättest ja eh müssen jede Stelle editieren. Nun musst du halt noch aus den Textboxen RichtTextBoxen machen :/ Da musst du wohl durch.
vit30 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 38



BeitragVerfasst: Mi 31.03.10 09:56 
Habe schon gemacht :) War nicht so tragisch.
Aber ich komme trotzdem nicht weiter.
Ich habe folgendes versucht:
ausblenden C#-Quelltext
1:
2:
3:
4:
                Form form = new Form();
                form.Text = text_equal;
                form.BackColor = Color.DarkBlue;
                richTextBox1.Text = Output + "=" + (form.Text);


Farbe bleibt schwarz.
danielf
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1012
Erhaltene Danke: 24

Windows XP
C#, Visual Studio
BeitragVerfasst: Mi 31.03.10 10:00 
Ich vermute du willst die Farbe der ricTextBox1 ändern .. und nicht der Form?
vit30 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 38



BeitragVerfasst: Mi 31.03.10 10:02 
genau,aber ich weiss nicht wie..
JüTho
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2021
Erhaltene Danke: 6

Win XP Prof
C# 2.0 (#D für NET 2.0, dazu Firebird); früher Delphi 5 und Delphi 2005 Pro
BeitragVerfasst: Mi 31.03.10 10:19 
Siehe die Beispiele unter RichTextBox.SelectionColor und RichTextBox.SelectedText.

Jürgen
vit30 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 38



BeitragVerfasst: Mi 31.03.10 10:28 
Danke!
Jetzt komme ich weiter!
Ich immer das Problem: ich weiss nicht wie man richtig suchen muss.
JüTho
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2021
Erhaltene Danke: 6

Win XP Prof
C# 2.0 (#D für NET 2.0, dazu Firebird); früher Delphi 5 und Delphi 2005 Pro
BeitragVerfasst: Mi 31.03.10 12:01 
user profile iconvit30 hat folgendes geschrieben Zum zitierten Posting springen:
Ich immer das Problem: ich weiss nicht wie man richtig suchen muss.

Im Zweifelsfall geht das immer über den Index nach "Name der Klasse" > "Alle Member" und dort die Inhaltsangabe der Eigenschaften, Methoden, Ereignisse.

Jürgen