How to set Back ground color and font in HTML Widget.? | developer.brewmp.com How to set Back ground color and font in HTML Widget.? | developer.brewmp.com

Developer

How to set Back ground color and font in HTML Widget.?

Forums:

Hi,

I'm working on HTML widget. I'm not able to set BG color to the HTML widget using IWidget_SetBGColor(pHtmlWidget, MAKE_RGB(150,150,150));

Even im unable to set the font style to the HTML text using IWidget_SetFontClass(pHtmlWidget, AEECLSID_FONTSYSBOLDITALIC);

 

In my code i have decorated HTML Widget to ViewPort Widget and i have taken the HTML text from ISOURCEUTIL_SourceFromMemory() and loaded this source to IDocModel as following. 

ISOURCEUTIL_SourceFromMemory(piSourceUtil, (void *)temp,STRLEN( temp), NULL, NULL, &piSource);

IDocModel_LoadSource(pIDocModel, piSource); 

 

Now text is drawing with White back ground and normal text font. I want to change these two. please help me.

 

 

Thanks in advance,

Sudarshan K.S.

Have you tried using the HTML to set this?

Have you tried using the HTML to set this?

Hi,
Yes, I hv tried to set these using HTML widget only. using the following code.
IWidget_SetBGColor(pHtmlWidget, MAKE_RGB(150,150,150));
IWidget_SetFontClass(pHtmlWidget, AEECLSID_FONTSYSBOLDITALIC);
 
here pHtmlWidget is a widget of classid AEECLSID_HTMLWidget.
 
 
Thanking u,
Sudarshan K.S.
 

Hi,
Yes, I hv tried to set these using HTML widget only. using the following code.
IWidget_SetBGColor(pHtmlWidget, MAKE_RGB(150,150,150));
IWidget_SetFontClass(pHtmlWidget, AEECLSID_FONTSYSBOLDITALIC);
 
here pHtmlWidget is a widget of classid AEECLSID_HTMLWidget.
 
 
Thanking u,
Sudarshan K.S.
 

I think BG color and font has to be set through HTML source, not IWidget APIs. HTML widget supports Html document background colors when specified in hex format using body tag. Also, supports Bold text (displayed using the AEE_FONT_BOLD font) and Large text (displayed using the AEE_FONT_LARGE font).

I think BG color and font has to be set through HTML source, not IWidget APIs. HTML widget supports Html document background colors when specified in hex format using body tag. Also, supports Bold text (displayed using the AEE_FONT_BOLD font) and Large text (displayed using the AEE_FONT_LARGE font).

Hi,
Thanks for your reply.
Can you please provide any code snippet for setting back ground color and text font for the HTML ?
It will be very helpful if u help me in this regard.
 
Thanking u in advance,
Sudarshan K.S.

Hi,
Thanks for your reply.
Can you please provide any code snippet for setting back ground color and text font for the HTML ?
It will be very helpful if u help me in this regard.
 
Thanking u in advance,
Sudarshan K.S.

Index

QCafe - HTML Widget App

Welcome to QCafe, offering the best music and dining experience in San Diego

Welcome to QCafe, offering the best music and dining experience in San Diego

Welcome to QCafe, offering the best music and dining experience in San Diego

BG color can be specified suing  and font size, color can be specified using . Refer any HTML tutorial for details.
 

Index

QCafe - HTML Widget App

Welcome to QCafe, offering the best music and dining experience in San Diego

Welcome to QCafe, offering the best music and dining experience in San Diego

Welcome to QCafe, offering the best music and dining experience in San Diego

BG color can be specified suing  and font size, color can be specified using . Refer any HTML tutorial for details.