
ALTEXTBOX QUE ESTA EN NEGRITA AGREGARLE KURSISVA O SUBRAYAD SIN QUE SE PIERDA NEGRITA
Publicado por francis jesus (1 intervención) el 10/12/2017 16:15:17

PROBLEMAS CON EL CHECKBOX:
AL MOMENTO DE EJECUTAR, ESCRIBO EN EL TEXTBOX Y SELECIONO NEGRITA EL TEXTO SE PONE EN NEGRITA PEO CUANDO SELECCIONO EN KURSIVA O SUBRAYADO SE PONE EN ESTOS PERO SE PIERDE EN NEGRITA.
COMO HARIA PARA QUE TENGA LOS FORMATOS.
HAY UNA FORMA O COMO SE CODIFICA , PLEASE
.
ESTE ES EL CODIGO:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
Public Class Practica3_TextoEditor
Private Sub CheckBoxNegrita_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBoxNegrita.CheckedChanged
If CheckBoxNegrita.Checked = True Then
TxtTexto.Font = New Font(TxtTexto.Font, FontStyle.Bold)
Else
TxtTexto.Font = New Font(TxtTexto.Font, FontStyle.Regular)
End If
End Sub
Private Sub CheckBoxKursiva_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBoxKursiva.CheckedChanged
If CheckBoxKursiva.Checked = True Then
TxtTexto.Font = New Font(TxtTexto.Font, FontStyle.Italic)
Else
TxtTexto.Font = New Font(TxtTexto.Font, FontStyle.Regular)
End If
End Sub
Private Sub CheckBoxSubraydo_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBoxSubraydo.CheckedChanged
If CheckBoxSubraydo.Checked = True Then
TxtTexto.Font = New Font(TxtTexto.Font, FontStyle.Underline)
Else
TxtTexto.Font = New Font(TxtTexto.Font, FontStyle.Regular)
End If
End Sub
Private Sub RadRojo_CheckedChanged(sender As Object, e As EventArgs) Handles RadRojo.CheckedChanged
If RadRojo.Checked = True Then
TxtTexto.ForeColor = Color.Red
End If
End Sub
Private Sub RadVerde_CheckedChanged(sender As Object, e As EventArgs) Handles RadVerde.CheckedChanged
If RadVerde.Checked = True Then
TxtTexto.ForeColor = Color.Green
End If
End Sub
Private Sub RadAzul_CheckedChanged(sender As Object, e As EventArgs) Handles RadAzul.CheckedChanged
If RadAzul.Checked = True Then
TxtTexto.ForeColor = Color.Blue
End If
End Sub
Private Sub CBFuente_SelectedIndexChanged(sender As Object, e As EventArgs) Handles CBFuente.SelectedIndexChanged
If CBFuente.SelectedItem = "Monotype Cursiva" Then
TxtTexto.Font = New System.Drawing.Font("Monotype Cursiva", "10")
ElseIf CBFuente.SelectedItem = "Matura MT Script Capitals" Then
TxtTexto.Font = New System.Drawing.Font("Matura MT Script Capitals", "10")
ElseIf CBFuente.SelectedItem = "Century Gothic" Then
TxtTexto.Font = New System.Drawing.Font("Century Gothic", "10")
ElseIf CBFuente.SelectedItem = "Comic Sans MS" Then
TxtTexto.Font = New System.Drawing.Font("Comic Sans MS", "10")
ElseIf CBFuente.SelectedItem = "Kristen ITC" Then
TxtTexto.Font = New System.Drawing.Font("Kristen ITC", "10")
End If
End Sub
End Class
ADJUNTO: MI PRACTICA
- PRACTICA-N3.rar(4,3 KB)
Valora esta pregunta


0