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

      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 ?!
    • 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
      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.