|
-
Jul 28th, 2004, 11:35 AM
#1
Thread Starter
Hyperactive Member
How to change Font ?
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 ???
-
Jul 28th, 2004, 11:47 AM
#2
object.Font = New Font(object.Font.FontFamily, obhect.Font.Size, FontStyle.Bold)
-
Jul 28th, 2004, 11:50 AM
#3
Thread Starter
Hyperactive Member
Originally posted by Cander
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 ?
-
Jul 28th, 2004, 11:55 AM
#4
Because some fool at Microsoft apprently likes overly verbose programming.

I guess in some ways it may offer more flexibility though. Dont know how but, possibly in some way.
-
Jul 28th, 2004, 12:08 PM
#5
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
-
Jul 28th, 2004, 12:40 PM
#6
Thread Starter
Hyperactive Member
Originally posted by kleinma
the help in .net is WAY WAY better than the help for VB6
Well, actually I happen to think otherwise ...
-
Jul 28th, 2004, 01:00 PM
#7
Originally posted by spoiledkid
Well, actually I happen to think otherwise ...
then you must not be using it correctly
-
Jul 28th, 2004, 01:03 PM
#8
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
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)
-
Jul 28th, 2004, 02:22 PM
#9
Frenzied Member
if this was an easy task, some of us wouldn't have jobs
-
Jul 28th, 2004, 04:58 PM
#10
Fanatic Member
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
*sighs*... wish i had MSDN installed
-
Jul 28th, 2004, 06:33 PM
#11
Thread Starter
Hyperactive Member
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 ...
-
Jul 29th, 2004, 12:36 AM
#12
New Member
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
-
Jul 29th, 2004, 12:51 AM
#13
-
Jul 29th, 2004, 08:53 AM
#14
Fanatic Member
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
uh sorry?
-
Jul 29th, 2004, 08:57 AM
#15
Oh yes, nice way to welcome yourself to a forum. Start flamming the folks who have been here awhile!
-
Jul 29th, 2004, 08:58 AM
#16
Fanatic Member
lol i didn't even realise he was flaming me... i just thought he was talking crap
-
Jul 29th, 2004, 09:01 AM
#17
It was rude considering all you said was you wish you had MSDN.
-
Jul 29th, 2004, 09:04 AM
#18
Originally posted by spoiledkid
you guys never get tired of complaning ...
sorry for trying to help you out [Edited by Moderator].... last time i answer one of your questions
Last edited by MartinLiss; Jul 29th, 2004 at 10:55 AM.
-
Jul 29th, 2004, 10:28 AM
#19
Thread Starter
Hyperactive Member
Originally posted by kleinma
sorry for trying to help you out [Edited by Moderator]... last time i answer one of your questions
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.
So Who's the [Edited by Moderator] now ?
Last edited by MartinLiss; Jul 29th, 2004 at 10:56 AM.
-
Jul 29th, 2004, 10:58 AM
#20
Please cut out the arguing and the insults.
-
Jul 29th, 2004, 11:23 AM
#21
but dad he started it
-
Jul 29th, 2004, 02:52 PM
#22
Thread Starter
Hyperactive Member
Originally posted by kleinma
but dad he started it
unbelievable !!
-
Jul 29th, 2004, 03:08 PM
#23
Originally posted by spoiledkid
unbelievable !!
kleinma's post was obviously an attempt to end the argument wth some humor. Can you both now please forget it.
-
Jul 29th, 2004, 03:16 PM
#24
No Hard Feelings
-
Jul 30th, 2004, 09:33 AM
#25
Fanatic Member
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.
OMG HOW PRETTY!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|