By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,890 Members | 1,097 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,890 IT Pros & Developers. It's quick & easy.

Text Size change in a text box

P: n/a
Hi,

I am facing difficulty in controlling the Textbox text
size. Can someone point out where I am going wrong.

Dim TB as Textbox

TB.Text = "Test" 'Works
TB.Font = New Font(TB.Font, FontStyle.Underline) 'Works

TB.Font.Size = ??? 'Help required ???

Regards

Vinay
Nov 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Vinay" <cu****@cursor.com> schrieb
Hi,
'Morning,
I am facing difficulty in controlling the Textbox text
size. Can someone point out where I am going wrong.

Dim TB as Textbox

TB.Text = "Test" 'Works
TB.Font = New Font(TB.Font, FontStyle.Underline) 'Works

TB.Font.Size = ??? 'Help required ???

Regards

Vinay


You can not change the size (probably because the OS (Windows, you know)
doesn't allow a font's size to be changed).

tb.font = new font(tb.font.name, NewSize, fonstyle.underline)
--
Armin

Nov 20 '05 #2

P: n/a
Cor
Hi Vinay
I think this works
TB.Font = New Font(TB.Font.Name, 15)
Cor
Nov 20 '05 #3

P: n/a
"Vinay" <cu****@cursor.com> schrieb
Hi,
'Morning,
I am facing difficulty in controlling the Textbox text
size. Can someone point out where I am going wrong.

Dim TB as Textbox

TB.Text = "Test" 'Works
TB.Font = New Font(TB.Font, FontStyle.Underline) 'Works

TB.Font.Size = ??? 'Help required ???

Regards

Vinay


You can not change the size (probably because the OS (Windows, you know)
doesn't allow a font's size to be changed).

tb.font = new font(tb.font.name, NewSize, fonstyle.underline)
--
Armin

Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.