Font in IE

  • Thread starter Mircea Pleteriu
  • Start date
M

Mircea Pleteriu

Hi all,

I have created a windows forms control named MyControl.
The control exposes a TextFont property of type Font.

I have created an HTML page which hosts MyControl control.
The page also contains a java script function from within I want to change
the Font property of my control.

The problem is that it throws an error if I try to assign the Font property
a string describing the font.. like

myControl.Font = "Microsoft Sans Serif, 8.25pt";

How could I set the Font property?
 
G

Guest

You need to create a font object. In this case, something like:

myControl.Font = new Font("Microsoft Sans Serif", 8.25F);

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top