Fonts in dialog

Hi All,

I want to change the font of dialog field which is formbuildstringcontrol. I have tried the following code but no luck. Can anyone tell me how to use fonts for string control in dialog.

static void SK_FontandColor(Args _args)
{
    FontName fontName;
    ;
    
    Dialog dialog             = new Dialog("Dialog example");
    DialogField f1            = dialog.addFieldValue(extendedTypeStr(String30), 'Value', "Delete this field's value?");
    FormBuildStringControl c1 = f1.control();
      
    c1.allowEdit(true);
    c1.skip(true);
    c1.bold(8);
    c1.fontSize(28);
    c1.colorScheme(FormColorScheme::RGB);
    c1.foregroundColor(WinAPI::RGB2int(255,0,0));
    fontName = c1.font();
    c1.font('Bernard MT');
    c1.viewEditMode(ViewEditMode::View);
    dialog.run();
}

Related
Recommended