BUTTON_SetBkColor() doesn't work

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

    • BUTTON_SetBkColor() doesn't work

      New

      Hello,
      I don't know what I'm missing but I can't get BUTTON_SetBkColor() to work. Here's my code :


      hButton = BUTTON_Create(110, 110, 100, 40, GUI_ID_OK, WM_CF_SHOW);
      BUTTON_SetText(hButton, "OK");
      BUTTON_SetTextColor(hButton,BUTTON_CI_UNPRESSED,GUI_BLUE);
      BUTTON_SetBkColor(hButton,BUTTON_CI_UNPRESSED,GUI_RED);
      BUTTON_SetTextOffset(hButton,20,0);

      All the other functions work well but not that one ?

      Any ideas ?

      EDIT : Also, when I draw some other elements on screen, such a line, my button won't be displayed at all ?!
    • New

      Hi,

      Yes, some time in the past some of the widgets got a skinning functionality. This is enabled by default. Unfortunately, this has caused some functions to become more or less useless. BUTTON_SetBkColor() is one of these functions.

      To change the button colors you should use BUTTON_SetSkinFlexProps(). This function sets the properties of the buttons globally.

      Regards,
      Sven