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

FontStyle class

P: n/a
Hi all,

I am having this error, Font 'Aharoni' does not support style
'Regular'.

In my codes, i try to catch the exception but seems like it is not
catching it. Any idea why?

How can i set my style to no style too?
Appreciate any help

try
{
switch (ss.Style)
{
case 1:
style = FontStyle.Bold;
break;
case 2:
style = FontStyle.Italic;
break;
case 3:
style = FontStyle.Italic |
FontStyle.Bold;
break;
default:
style = FontStyle.Regular;
break;
}
}
catch (Exception ex)
{
Console.Error.WriteLine("No style used for
text.\n{0}", ex.Message);
//style=default; //set to no style
}

Jan 30 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a

On Jan 30, 8:27 pm, xiaomi...@gmail.com wrote:
Hi all,

I am having this error, Font 'Aharoni' does not support style
'Regular'.

In my codes, i try to catch the exception but seems like it is not
catching it. Any idea why?

How can i set my style to no style too?
Appreciate any help

try
{
switch (ss.Style)
{
case 1:
style = FontStyle.Bold;
break;
case 2:
style = FontStyle.Italic;
break;
case 3:
style = FontStyle.Italic |
FontStyle.Bold;
break;
default:
style = FontStyle.Regular;
break;
}
}
catch (Exception ex)
{
Console.Error.WriteLine("No style used for
text.\n{0}", ex.Message);
//style=default; //set to no style
}
stupid me

i was catching the exception at the wrong place..
sorry for the post.

Jan 30 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.