Widget schemes don't seem to work

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Widget schemes don't seem to work

    How do I get the libraries to pay attention to the WIDGET_USE_SCHEME_(SMALL,MEDIUM,LARGE) defines as explained in the emWin users manual, section 17.2? If I build samples WIDGET_SchemeSmall or WIDGET_SchemeLarge and simulate them in Visual Studio, the apps run OK but the font size is the same, possibly is large font, definitely not the small one.

    Anyone know what the default fonts are for these schemes? I could at lease use the various WIDGET_SetDefaultFont routines to achieve the same result.
  • Hello Dougm,

    The WIDGET_Scheme... samples make use of the WIDGET_USE_SCHEME_... preprocessor definition. Please note that these definitions are processed before the code is compiled. Since you have a precompiled library, changing preprocessor settings does not have any effect. You will need to use functions to set fonts at runtime. Please find below the font sizes according to the scheme and widget:

    BUTTON, CHECKBOX, DROPDOWN, EDIT, HEADER, ICONVIEW, LISTBOX, LISTVIEW, LISTWHEEL, MENU, MULTIEDIT, RADIO, TEXT, TREEVIEW
    &GUI_Font13_1
    &GUI_Font16_1
    &GUI_Font24_1

    FRAMEWIN
    &GUI_Font8_1
    &GUI_Font13_1
    &GUI_Font16_1

    GRAPH_SCALE, PROGBAR
    &GUI_Font6x8
    &GUI_Font8x12_ASCII
    &GUI_Font8x16

    Best regards,
    Adrian