Re: FontStyle..
From: Armin Zingler (az.nospam_at_freenet.de)
Date: 05/28/04
- Next message: tMan: "Re: Read XML Help."
- Previous message: Armin Zingler: "Re: How to get programmatically screen width?"
- In reply to: VJ: "Re: FontStyle.."
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 29 May 2004 00:48:48 +0200
"VJ" <vijaybalki@yahoo.com> schrieb
> > > I am just asking how to store FontStyle in a variable and assign
> > > it back again.
> >
> > What's the exact problem? The value is an 'Int32', so you can
> > simply take the value, store it and assign it to the variable
> > later.
>
> We have a situtation were we are letting the user change font in a
> Textbox. How do I store the Font Information of the TextBox and then
> show it back..
>
> Say like...
>
> Dim intFntStyle as Int32
> intFntStyle = TextBox1.Font.FontStyle
Why FontStyle? The property name is Style
> Dim intReadFntStyle as Int32
> 'intReadFntStyle <- value from file
> TextBox1.Font.FontStyle = intReadFntStyle
>
> The above looks good to me ... but does not compile or work?? How do
> I do something similar...
As the error message - after replacing FontStyle by Style - the property is
read-only. You must create a new font and assign it to the Font property of
the Textbox. See the available constructors of the Font class.
-- Armin How to quote and why: http://www.plig.net/nnq/nquote.html http://www.netmeister.org/news/learn2quote.html
- Next message: tMan: "Re: Read XML Help."
- Previous message: Armin Zingler: "Re: How to get programmatically screen width?"
- In reply to: VJ: "Re: FontStyle.."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|