We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Applying specific CSS formating to IHTMLElements

Using the HTMLUIControl.GetElementAtClientPoint() method I acquire a reference to a IHTMLElement. If I want to change the formatting or presentation of that element, how would I achieve that? The IHTMLElement.Format property is read only and there does not appear to be an applicable method to alter it. In the same vein, how would I alter its Visible status? Thanks for the help, Adam

3 Replies

DJ Davis Jebaraj Syncfusion Team January 13, 2005 08:37 AM UTC

Hi Adam, You can access the elements as BaseElement and set its IsVisible property to be false to change the element''s visiblity. The style for a element can also be changed through the Attributes["class"].Value property. Please refer to the sample linked to below: F23420HTMLUIElementCSS_8850.zip Regards, Davis

AF Adam Flynn January 26, 2005 06:18 PM UTC

I was hoping to create a custom collection of HTMLFormat objects, representing specific CSS formats, and apply them to individual IHTMLElements. Can you explain if there is a way to programmatically create (i.e. not read the styles from a file) an object that contains a specific css style and then apply it to one or more IHTMLElements? Thanks.

DJ Davis Jebaraj Syncfusion Team February 1, 2005 01:25 PM UTC

Hi Adam, There is currently no way to assign HTMLFormat objects directly to HTMLElements. I have requested a feature request for this and I will update you as soon as the feature has been implemented. Thank you for your patience. Regards, Davis

Live Chat Icon For mobile
Up arrow icon