0

i have a richtextbox and i want to make black color that text has to blue and the background color from white to yellow.

I do not want to do .SelectionColor=Color.Blue or .SelectionBackColor=Color.Yellow but instead i want to do that using the gdi+ FillRectangle methods or somehow else.

I have the text with a white background and i want to make the background color to yellow and the forecolor from black to blue.

Is there such a way to do that such as FillRectangle. I tried to do a FillRectangle with a transparent color but the colors werent't great afterwards.

In general in GDI+ how can i convert two colors from one to antoher ?

Thanks !

4

1 に答える 1

0

だからあなたはこれを行うことができます

        Graphics g = ((Control)richTextBox1).CreateGraphics();
        g.FillRectangle(Brushes.Yellow, 0, 0, 100, 100);
于 2012-04-19T13:13:12.970 に答える