Font Size in Text box

  • Thread starter Thread starter Jonesgj
  • Start date Start date
J

Jonesgj

Hi all,

Simple one I'm sure... How can I change the size of font used in textbox at
runtime?

Jonesgj
 
Hi Jonesqj,

I learn you a trick.

You change it in the designer and then you look what code it has generated
in the designer generated code part.

You copy that to your program and change it as you wish.

(To change the font is a little but much code)

I hope this helps?

Cor
 
Jonesgj said:
Hi all,

Simple one I'm sure... How can I change the size of font used in
textbox at runtime?

Jonesgj

textBox.Font = new Font(textBox.Font.FontFamily, newSize,
textBox.Font.Style);
You may need to use a slightly different constructor if you need more
options.

- Pete
 
* "Jonesgj said:
Simple one I'm sure... How can I change the size of font used in textbox at
runtime?

\\\
Me.TextBox1.Font = New Font("Times New Roman", 22)
///
 
* "Jonesgj said:
Thanks Guys,

It was simple wasnt it :-)

Have a look at the other overloaded versions of the 'Font' class's ctor
too.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top