none
color dialog and selected text in richtextbox

    Question

  • i'm trying to only change the color of the selected text in a richtextbox using the color dialog.. this code changes all the text..

     Dim dlgcolor As New ColorDialog
            dlgcolor.Color = PictureBox4.BackColor
            If dlgColor.ShowDialog() = DialogResult.OK Then
                PictureBox4.BackColor = dlgcolor.Color
                rtb1.ForeColor = dlgcolor.Color
            End If
    any ideas how to get only the selected text to change color?


    i,m finally catching on to this vb.net stuff... thanx guys! ;o)
    Tuesday, June 02, 2009 11:51 AM

Answers

  • i don't know why i did not find this earlier...

    rtb1.SelectionColor = dlgcolor.Color
    (sighs...)


    i,m finally catching on to this vb.net stuff... thanx guys! ;o)
    Tuesday, June 02, 2009 12:07 PM