How to change font for InfoStaticTextWidget in runtime
Hi,
I have a InfoStaticTextWidget defined like this
InfoStaticTextWidget
(
kTP1StaticWidgetID, // WidgetId
kSysStaticTextPMRsrcId, // RsrcId
kBindNone, // Frame binding
Frame(19,30,300,60), // Frame
kTrue, kTrue, // Visible, Enabled
kAlignLeft, // Alignment
kDontEllipsize, kTrue, // Ellipsize style, Convert ampersands
kTP1StaticTextKey, // Text Control Data
0, // WidgetId for associated control for shortcut focus
-1,-1,
)
Now I want to change the font for this static widget in runtime.
I have added the code below
IControlView* controlView1 = panelControlData->FindWidget(kTP1StaticWidgetID);
InterfacePtr<IUIFontSpec> fontSpec(controlView1,UseDefaultIID())
fontSpec->SetFontID(kPoint20BoldWindowFontId);
But font for this StaticTextWidget is not changing to kPoint20BoldWindowFontId, instead it shows basic font.
Is there anyone who has tried this before.( I am currently using Indesign CC 2014.).