![]()

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »chenjung« (12. Juli 2010, 17:59)
Zitat
wenn ich auf formatieren clicke passiert gar nichts!
Zitat
SCHEIßEEEEEEEE!
Dieser Beitrag wurde bereits 3 mal editiert, zuletzt von »chenjung« (16. Juli 2010, 11:36)


Dieser Beitrag wurde bereits 3 mal editiert, zuletzt von »chenjung« (23. Juli 2010, 20:00)
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »chenjung« (25. Juli 2010, 02:37)
|
|
Visual Basic Quellcode |
1 2 3 4 5 6 7 |
Private Sub ToolStripComboBox2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripComboBox2.Click For I As Integer = 0 To RichTextBox1.SelectionLength - 1 RichTextBox1.SelectionLength = 1 RichTextBox1.SelectionFont = New Font(RichTextBox1.Font.FontFamily, CType(Me.ToolStripComboBox2.SelectedItem, Single)) RichTextBox1.SelectionStart += 1 Next End Sub |

Dieser Beitrag wurde bereits 3 mal editiert, zuletzt von »chenjung« (26. Juli 2010, 11:02) aus folgendem Grund: Bild angehängt.
lass nur die 4te Zeile stehen
|
|
Visual Basic Quellcode |
1 2 3 |
Private Sub ToolStripComboBox1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripComboBox1.Click RichTextBox1.SelectionFont = New Font(RichTextBox1.Font.FontFamily, CType(Me.ToolStripComboBox1.SelectedItem, Single)) End Sub |
wenn ToolStripComboBox1 einen Wert kleiner ist gleich 0 hat, dann musst du diesen durch einen Standard Wert, wie z.B. 12 ersetzen...

|
|
Visual Basic Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
Private Sub ToolStripComboBox1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripComboBox1.Click Dim newFontStyle As System.Drawing.Font = RichTextBox1.SelectionFont() If (ToolStripComboBox1.Text = "Courier New") Then RichTextBox1.SelectionFont = New Font("Courier New", 12, newFontStyle.Style) End If If (ToolStripComboBox1.Text = "Arial") Then RichTextBox1.SelectionFont = New Font("Arial", 12, newFontStyle.Style) End If If (ToolStripComboBox1.Text = "Times New Roman") Then RichTextBox1.SelectionFont = New Font("Times New Roman", 12, newFontStyle.Style) End If End Sub |
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »chenjung« (26. Juli 2010, 13:37)
FileSpy 1.2 - Herausfinden, wo Programme ihre Daten speichern! Zum Download es wird immer besser!
weiter so!


SelectionFont=
|
|
Visual Basic Quellcode |
1 |
RichTextBox1.SelectionProtected = IIf(GetAttr("Aktuellgeöffnete Datei"), FileAttribute.ReadOnly, FileAttribute.Normal) |
FileSpy 1.2 - Herausfinden, wo Programme ihre Daten speichern! Zum Download SelectionBack
|
|
Visual Basic Quellcode |
1 2 3 |
Private Sub RichTextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RichTextBox1.TextChanged RichTextBox1.SelectionColor = Color.Red End Sub |
SelectionColor macht einfach nur den markierten Text in dieser Farbe, da muss natürlich der entsprechende markiert sein...