Focus on Radio button

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

    • Focus on Radio button

      Hello,

      I'm using Radio with few element (not more then 4).
      If I'm using the font under 16 for element all work fine, I mean that the first element is focused with the rectangle,
      but the font used is more than 16 the first element is never focused with the rectangle.
      In attached the two picture.

      Where I'm wrong ?
      What can I do to have focus with rectangle for font size more then 16 ?

      Thanks a lot for your support
      Best Regards

      Marco Pazzi
      Images
      • Focused_element.JPG

        12.56 kB, 204×153, viewed 436 times
      • Not_Focused_element.JPG

        14.4 kB, 182×229, viewed 334 times
    • Hi.

      There is a bug in emWin - if the size of text is greater than size of round radio-button, then the rectangle around the first element of this radio-button will not drawn.
      To avoid this situation increase the size of radio (it is possible only if you use SkinFlex props and it will be applied for all radiobuttons, thus place this code somewhere in your "init" code):

      RADIO_SKINFLEX_PROPS radioProps;
      U8 rbSize = 36;

      RADIO_GetSkinFlexProps(&radioProps, RADIO_SKINFLEX_PI_PRESSED);
      radioProps.ButtonSize = rbSize;
      RADIO_SetSkinFlexProps(&radioProps, RADIO_SKINFLEX_PI_PRESSED);

      RADIO_GetSkinFlexProps(&radioProps, RADIO_SKINFLEX_PI_UNPRESSED);
      radioProps.ButtonSize = rbSize;
      RADIO_SetSkinFlexProps(&radioProps, RADIO_SKINFLEX_PI_UNPRESSED);
      Best regards,
      Volodymyr.

      The post was edited 1 time, last by volodymyr ().