Author Message

How do I create an instance of this object?
    1. Class is "sealed"
    2. It does not have any constructor.

Is there some class from where I can get this object? Please don't tell
about the "WebControl" or any other class in this namespace . I have been
having some problems using that.

Happy Hacking!
Master Gaurav

Sat, 06 Mar 2004 14:41:28 GMT  
Hi Gaurav,

The FontInfo class can't be created directly. However, it has a friend
class System.Web.UI.WebControls.Style. The Style class has a read-only
property named Font. The first time you get the value of this property, an
instance of the FontInfo class will be created. Then you can hold this
instance in your class and perform some operations. The following code
fragment demonstrates how to create an instance of the FontInfo class.

Style st = new Style();
st.Font.Bold = true;

Jun Su          

Tue, 09 Mar 2004 15:37:00 GMT  
 [ 2 post ] 

 Relevant Pages 

1. Q: SelectedIndexChanged event for System.Web.UI.WebControls.DropDownList

2. Adding Web Controls to the System.Web.UI.WebControls namespace

3. Microsoft.Web.UI.WebControls.{MultiPage, TabStrip}

4. I can not find System.Web.UI.WebControls

5. Microsoft.Web.UI.WebControls

6. Can System.Web.UI.WebControls.PreRender overridable?

7. Unhandled Exception: System.Configuration.ConfigurationException: Could not create System Configuration.NameValueSectionHandler, System

8. Layout of Custom System.Web.UI.UserControl Objects added to parent

9. Subclassing System.Web.UI.Page

10. System.Web.UI.Page

11. can't find namespace using System.Web.UI.Design

12. ? HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_


Powered by phpBB® Forum Software