Dropdown scrollbar color

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

    • Dropdown scrollbar color

      Hi guys,

      I'm facing some problems with the automatic scrollbar of a dropdown widget. I would like to change the color of the arrows, thumb area and shaft using function DROPDOWN_SetScrollbarColor() but I still get a skinned scrollbar, even if I've removed skinning from the "father" dropdown widget.

      How to remove skinning from automatic scrollbar of dropdown?

      I've thought about calling routine WIDGET_SetEffect() on scrollbar, but how to get scrollbar handler to pass to this function?


      Here my code


      Source Code

      1. /* Appearance.
      2. * - Remove skinning (which is the default configuration)
      3. * - Effect simple
      4. * - Frame color
      5. * - Background color
      6. * - Text Color
      7. */
      8. WIDGET_SetEffect( h_dropdown, &WIDGET_Effect_Simple ); DROPDOWN_SetSkinClassic( h_dropdown );
      9. DROPDOWN_SetBkColor( h_dropdown, DROPDOWN_CI_UNSEL, DROPDOWN_BACKGROUND_COLOR_DEFAULT );
      10. DROPDOWN_SetBkColor( h_dropdown, DROPDOWN_CI_SEL, DROPDOWN_BACKGROUND_COLOR_DEFAULT );
      11. DROPDOWN_SetBkColor( h_dropdown, DROPDOWN_CI_SELFOCUS, DROPDOWN_BACKGROUND_COLOR_SELECTED_FOCUS );
      12. DROPDOWN_SetColor( h_dropdown, DROPDOWN_CI_BUTTON, DROPDOWN_BACKGROUND_COLOR_BUTTON );
      13. DROPDOWN_SetTextColor( h_dropdown, DROPDOWN_CI_UNSEL, DROPDOWN_TEXT_COLOR_DEFAULT );
      14. DROPDOWN_SetTextColor( h_dropdown, DROPDOWN_CI_SEL, DROPDOWN_TEXT_COLOR_DEFAULT );
      15. DROPDOWN_SetTextColor( h_dropdown, DROPDOWN_CI_SELFOCUS, DROPDOWN_TEXT_COLOR_DEFAULT );
      16. // Scrollbar
      17. DROPDOWN_SetScrollbarWidth( h_dropdown, DROPDOWN_SCROLLBAR_WIDTH ); DROPDOWN_SetScrollbarColor( h_dropdown, SCROLLBAR_CI_THUMB, GUI_CYAN ); DROPDOWN_SetScrollbarColor( h_dropdown, SCROLLBAR_CI_SHAFT, GUI_CP_GRAY ); DROPDOWN_SetScrollbarColor( h_dropdown, SCROLLBAR_CI_ARROW, GUI_CP_ORANGE );
      Display All
    • Hi,

      You can switch back to the classic skin by calling <WIDGET>_SetDefaultSkinClassic(). In you case it would be SCROLLBAR_SetDefaultSkinClassic().

      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.