Home All Groups Group Topic Archive Search About
Author
29 Nov 2007 5:35 PM
mike
trying to convert selected text in a textbox to bold font.

can someone provide me code sample?

thanks.

Author
29 Nov 2007 5:55 PM
Cor Ligthert[MVP]
Mike,

In my idea is what you want with a textbox impossible (or you should set
your computer in any way only displaying bold characters).

Use for your purpose the richtextbox.

Cor
Author
29 Nov 2007 7:10 PM
Tom Shelton
On Nov 29, 10:35 am, mike <m***@discussions.microsoft.com> wrote:
> trying to convert selected text in a textbox to bold font.
>
> can someone provide me code sample?
>
> thanks.

Just to make sure you understand Cor's message...  He's telling you,
correctly, that you can't get there from  here.  In a normal TextBox
contorl, the font is either bold or it's not.  You can't have some
bold, some not bold.  To accomplish that, you need to use a
RichTextBox control.

--
Tom Shelton
Author
29 Nov 2007 7:13 PM
Jack Jackson
On Thu, 29 Nov 2007 09:35:01 -0800, mike
<m***@discussions.microsoft.com> wrote:

>trying to convert selected text in a textbox to bold font.
>
>can someone provide me code sample?

You can't do that.  A Textbox has one Font property that applies to
all of the text.