Thanks Ahmed, it works fine but i have still two questions
1)
if I don't want bold, italic ... I set the font to regular but I lose both
when they are there
how set I the text to not bold only or to not italic only
2)
I have taken a code from internet for making the text greater by clicking
and after a little changing it works fine but the original text become Bold
after wich I don't understand for what reason
Here follows the code
Private Sub mnuGroter_Click (ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles mnuGroter.Click
Const iBasisGrootte As Single = 12
Static FontsizeVergrot ing As Single = 3
Dim fontsize As Single
Static sGeselecteerd As String
If sGeselecteerd <> rtb.SelectedTex t Then 'other text
FontsizeVergrot ing = 3
End If
If rtb.SelectionLe ngth > 0 Then
Dim selStart As Integer = rtb.SelectionSt art
Dim selLength As Integer = rtb.SelectionLe ngth
Dim currFont As System.Drawing. Font
fontsize = iBasisGrootte + FontsizeVergrot ing
Dim i As Integer
For i = 0 To selLength - 1
rtb.Select(selS tart + i, 1)
currFont = rtb.SelectionFo nt
rtb.SelectionFo nt = New Font(currFont.F ontFamily, fontsize, _
currFont.Style)
Next
rtb.Select(selS tart, selLength)
FontsizeVergrot ing = FontsizeVergrot ing + 2
sGeselecteerd = rtb.SelectedTex t
End If
End Sub
andreas" <an*****@pandor a.be> wrote in message
news:df******** *************** @phobos.telenet-ops.be...
When I select a text in a richtextbox to set de selected text in bold,
regular, italic .. or non I want to do that with one click
Thus I must find out if the selected text is already in bold, regular,
italic......
Is there any code for this
Thanks for any response