How do you change the font of any object say RadioButton at run time. It always says property Font.Bold is readonly at run time ???
Printable View
How do you change the font of any object say RadioButton at run time. It always says property Font.Bold is readonly at run time ???
object.Font = New Font(object.Font.FontFamily, obhect.Font.Size, FontStyle.Bold)
Yes, Thanks, I had just figured this out. This is weird though, why can't you just change the bold property ? Why do you have to initialize a whole new goddamn font object ?Quote:
Originally posted by Cander
object.Font = New Font(object.Font.FontFamily, obhect.Font.Size, FontStyle.Bold)
Because some fool at Microsoft apprently likes overly verbose programming.
:p
I guess in some ways it may offer more flexibility though. Dont know how but, possibly in some way.
cause the font object is inherited by a lot of different objects.. in the grand scheme of things, it makes it a lot easier for each object that has text displayed on it, inherits from the font object instead of having to have its own font properties
also just a suggestion... but I ran into the same problem but I hit F1 and got my answer a lot faster than posting on here ;)
the help in .net is WAY WAY better than the help for VB6
Well, actually I happen to think otherwise ...Quote:
Originally posted by kleinma
the help in .net is WAY WAY better than the help for VB6
then you must not be using it correctlyQuote:
Originally posted by spoiledkid
Well, actually I happen to think otherwise ...
for example if I did
VB Code:
Dim NewRadio as New RadioButton Radio.Font
and I put the cursor on Font in the Radio.Font line of the code and hit F1, I get the help for Control.Font (which is the font object all controls inherit from)
and you get the help screen including THIS code
Quote:
The following is an example of how to adjust the existing font to make it bold:
MyControl.Font = New Font(MyControl.Font, _
MyControl.Font.Style Or FontStyle.Bold)
if this was an easy task, some of us wouldn't have jobs :D
*sighs*... wish i had MSDN installedQuote:
Originally posted by kleinma
for example if I did
VB Code:
Dim NewRadio as New RadioButton Radio.Font
and I put the cursor on Font in the Radio.Font line of the code and hit F1, I get the help for Control.Font (which is the font object all controls inherit from)
and you get the help screen including THIS code
you guys never get tired of complaning ...Quote:
Originally posted by kleinma
for example if I did
VB Code:
Dim NewRadio as New RadioButton Radio.Font
and I put the cursor on Font in the Radio.Font line of the code and hit F1, I get the help for Control.Font (which is the font object all controls inherit from)
and you get the help screen including THIS code
Hey Litha,
Did it ever struck u ... if u know the Thing to search for in MSDN
may be u can take that phrase and put it in Search
:ehh:
uh sorry?Quote:
Originally posted by tanmoymoitra
Hey Litha,
Did it ever struck u ... if u know the Thing to search for in MSDN
may be u can take that phrase and put it in Search
Oh yes, nice way to welcome yourself to a forum. Start flamming the folks who have been here awhile!
:ehh:
lol i didn't even realise he was flaming me... i just thought he was talking crap
It was rude considering all you said was you wish you had MSDN.
sorry for trying to help you out [Edited by Moderator].... last time i answer one of your questionsQuote:
Originally posted by spoiledkid
you guys never get tired of complaning ...
You did not try n help out, you started bitchin straightaway. And I know MSDN is there, there must be some reason I posted the question here. I do not find MSDN as helpful as may be you do. And this forum and people are there to help. And this isn't the first time this has happened. People do post questions here (And I am sure you would have done that too at some point of time) that I think could have been found in MSDN. If everybody could go and look in the MSDN and find what they need, JupiterMedia will have to shutdown this site.Quote:
Originally posted by kleinma
sorry for trying to help you out [Edited by Moderator]... last time i answer one of your questions
So Who's the [Edited by Moderator] now ?
Please cut out the arguing and the insults.
but dad he started it :bigyello:
unbelievable !!Quote:
Originally posted by kleinma
but dad he started it :bigyello:
kleinma's post was obviously an attempt to end the argument wth some humor. Can you both now please forget it.Quote:
Originally posted by spoiledkid
unbelievable !!
No Hard Feelings
http://neforum.com.ua/forums/neforum/peace_sign.jpg
OMG HOW PRETTY!Quote:
Originally posted by MartinLiss
kleinma's post was obviously an attempt to end the argument wth some humor. Can you both now please forget it.