ManuAntibes
Messages postés491Date d'inscriptionmardi 24 octobre 2000StatutMembreDernière intervention18 novembre 20215 22 févr. 2019 à 09:09
Merci pour la reponse , je vais tester.
Class RTFLabel
Inherits System.Windows.Forms.RichTextBox
Public Sub New()
Me.BackColor = System.Drawing.SystemColors.InactiveBorder
Me.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.[ReadOnly] = True
End Sub
Public Sub Append(ByVal text As String, ByVal f As Font)
Dim length As Integer = text.Length
Dim start As Integer = Me.Text.Length
Me.AppendText(text)
Me.[Select](start, length)
Me.SelectionFont = f
Me.[Select](0, 0)
End Sub
Public Sub Append(ByVal text As String, ByVal fs As FontStyle)
Dim f As Font = New Font(Me.Font, fs)
Me.Append(text, f)
End Sub
Public Sub AppendRegular(ByVal text As String)
Me.Append(text, FontStyle.Regular)
End Sub
Public Sub AppendBold(ByVal text As String)
Me.Append(text, FontStyle.Bold)
End Sub
Public Sub AppendItalic(ByVal text As String)
Me.Append(text, FontStyle.Italic)
End Sub
Public Sub AppendUnderline(ByVal text As String)
Me.Append(text, FontStyle.Underline)
End Sub
Public Sub AppendStrikeout(ByVal text As String)
Me.Append(text, FontStyle.Strikeout)
End Sub
End Class