FontStyle..

  • Thread starter Thread starter VJ
  • Start date Start date
V

VJ

FontStyle is a enum type .. I want to store this FontStyle as a column in
datatable. when the users saves data.. and show it back when user opens the
XML data... We figured how to store Font Name.. and Font Size..

VJ
 
* "VJ said:
FontStyle is a enum type .. I want to store this FontStyle as a column in
datatable. when the users saves data.. and show it back when user opens the
XML data... We figured how to store Font Name.. and Font Size..

What's the probpem with 'FontStyle'? It's "basically" an 'Int32'.
 
It is ?... so I can set a Integer value to it... When I do a list.. it shows
up as Enum and no variables to set values.

I am just asking how to store FontStyle in a variable and assign it back
again.

VJ
 
* "VJ said:
It is ?... so I can set a Integer value to it... When I do a list.. it shows
up as Enum and no variables to set values.

It's an enum, but you can assign the constants to an 'Int32', and easily
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

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...

Thanks
VJ
 
VJ said:
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
 
Back
Top