MULTIPAGE - Change Tab Color?

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

    • MULTIPAGE - Change Tab Color?

      Hi,

      Is there a way to change the background color of the MULTIPAGE tab?

      I'm able to change the tab font without issues, and the background color of the dialog box attached to the tab... but the tab itself always has a white background?

      (see the attached picture)
      Images
      • multipage_tabs.jpg

        122.87 kB, 711×357, viewed 587 times
    • Hi,

      If using the classic skin you can use the function MULTIPAGE_SetBkColor().

      When using the Flex skin you have to use the function MULTIPAGE_SetSkinFlexProps().


      Just take a look into the manual for more information about these functions and skin flex properties.


      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.
    • MikeFlyersFan wrote:

      Hi,

      Is there a way to change the background color of the MULTIPAGE tab?

      I'm able to change the tab font without issues, and the background color of the dialog box attached to the tab... but the tab itself always has a white background?

      (see the attached picture)
      Hello.

      I already solved this.

      I wrote callback-function for multipage like this:

      Source Code

      1. static void callbackForMultipage(WM_MESSAGE * pMsg) {
      2. int isFocused = WM__IsAncestorOrSelf(WM_GetFocussedWindow(), pMsg->hWin);
      3. MULTIPAGE_SKINFLEX_PROPS multipageProps;
      4. GUI_COLOR actileColor = GUI_RED;
      5. GUI_COLOR inactiveColor = GUI_MAGENTA;
      6. switch (pMsg->MsgId) {
      7. case WM_NOTIFY_CHILD_HAS_FOCUS:
      8. MULTIPAGE_GetSkinFlexProps(&multipageProps, MULTIPAGE_SKINFLEX_PI_SELECTED);
      9. multipageProps.BkColor = isFocused ? actileColor : inactiveColor;
      10. MULTIPAGE_SetSkinFlexProps(&multipageProps, MULTIPAGE_SKINFLEX_PI_SELECTED);
      11. WM_InvalidateWindow(pMsg->hWin);
      12. break;
      13. default:
      14. break;
      15. }
      16. MULTIPAGE_Callback(pMsg);
      17. }
      Display All
      Best regards,
      Volodymyr.
    • volodymyr wrote:

      MikeFlyersFan wrote:

      Hi,

      Is there a way to change the background color of the MULTIPAGE tab?

      I'm able to change the tab font without issues, and the background color of the dialog box attached to the tab... but the tab itself always has a white background?

      (see the attached picture)
      Hello.
      I already solved this.

      I wrote callback-function for multipage like this:

      Source Code

      1. static void callbackForMultipage(WM_MESSAGE * pMsg) {
      2. int isFocused = WM__IsAncestorOrSelf(WM_GetFocussedWindow(), pMsg->hWin);
      3. MULTIPAGE_SKINFLEX_PROPS multipageProps;
      4. GUI_COLOR actileColor = GUI_RED;
      5. GUI_COLOR inactiveColor = GUI_MAGENTA;
      6. switch (pMsg->MsgId) {
      7. case WM_NOTIFY_CHILD_HAS_FOCUS:
      8. MULTIPAGE_GetSkinFlexProps(&multipageProps, MULTIPAGE_SKINFLEX_PI_SELECTED);
      9. multipageProps.BkColor = isFocused ? actileColor : inactiveColor;
      10. MULTIPAGE_SetSkinFlexProps(&multipageProps, MULTIPAGE_SKINFLEX_PI_SELECTED);
      11. WM_InvalidateWindow(pMsg->hWin);
      12. break;
      13. default:
      14. break;
      15. }
      16. MULTIPAGE_Callback(pMsg);
      17. }
      Display All


      Oh man! This is even better! I didn't even think about the 'focused' versus 'non-focused' show of the tabs, that rocks..


      Thanks so much for this, this is perfect!!


      - Mike