Button transparency

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

    • Button transparency

      Hello,

      I wanted to set transparent background for button widget. I have done this using following implementation but when I enable BUTTON_SetSkinFlexProps() then it took ~20 seconds to load the screen.

      When I comment out following code then the screen loads smoothly without delay.

      I have tried BUTTON_SetBkColor() function to set the background color but it has no effect on the button's background color.

      Could you please help me to set the background for button widget?

      typedef struct {
      GUI_COLOR aColorFrame[3];
      GUI_COLOR aColorUpper[2];
      GUI_COLOR aColorLower[2];
      int Radius;
      } BUTTON_SKINFLEX_PROPS;


      BUTTON_SKINFLEX_PROPS props;


      props.aColorFrame[0] = 0x373737;
      props.aColorFrame[1] = 0x373737;
      props.aColorFrame[2] = 0x373737;
      props.aColorLower[0] = 0x373737;
      props.aColorLower[1] = 0x373737;
      props.aColorLower[2] = 0x373737;
      props.aColorUpper[0] = 0x373737;
      props.aColorUpper[1] = 0x373737;
      props.aColorUpper[2] = 0x373737;
      BUTTON_SetSkinFlexProps(&props, BUTTON_SKINFLEX_PI_ENABLED);
      BUTTON_SetSkinFlexProps(&props, BUTTON_SKINFLEX_PI_PRESSED);
      BUTTON_SetSkinFlexProps(&props, BUTTON_SKINFLEX_PI_FOCUSSED);
      BUTTON_SetSkinFlexProps(&props, BUTTON_SKINFLEX_PI_DISABLED);


      Thanks,
      Vikram
    • Hi,

      BUTTON_SetBkColor() only works when not using skinning. The best way to display a button transparent would be to set a callback routine and do nothing, since the button is already a transparent window.

      What exactly do you mean by transparent background?

      Thanks and best regards,

      Florian
      Please read the forum rules before posting.

      Keep in mind, this is *not* a support forum.
      Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
      Should you be entitled to support you can contact us via our support system: segger.com/ticket/

      Or you can contact us via e-mail.