How to set Scroll Bar border width

Posted by: mikedempsey on 8 September 2017, 2:52 pm EST

  • Posted 8 September 2017, 2:52 pm EST

    I currently create an EnhancedScrollBarRenderer so that I can override the colors.

    However it always draws wide borders (2 pixels instead of 1) around the thumb and buttons, which looks completely different from the scroll bars in the other controls I use.

    How do I tell it to draw the usual 1 pixel border?


  • Replied 8 September 2017, 2:52 pm EST


    I don't think there is any way to change how EnhancedScrollBarRenderer draws the borders around those elements.  You could implement a custom scroll bar renderer using IScrollBarRenderer and set up a clip rectangle where appropriate to exclude the border you don't want before calling the base EnhancedScrollBarRenderer methods.

  • Replied 8 September 2017, 2:52 pm EST

    Thanks, that's what I feared.
  • Replied 8 September 2017, 2:52 pm EST

    Since the only solution is to write my own interface - and I know nothing about graphics - that isn't an option.

    I tried deriving a class from the EnhancedScrollbarRenderer and overriding the DrawHorizontalThumb() function but my code is never called. (I have no idea why not)

    Could you enter an enhancement request to add a new property to the EnhancedScrollbarRenderer.
    Probably one of the following names:
       NarrowBorder = True/False   (Current setting is False)
       WideBorder = True/False      (Curent setting is True)
       BorderWidth =                (Current value is 2, probably limit to 1-2 or 1-3) 

    This wide border currently seems to apply only to the Top/Bottom borders of the Thumb and Arrow buttons on a Horizontal scroll bar, and to the Left/Right sides in a vertical scrollbar.
    The other sides are already the expected 1 pixel wide.

    Is this simply a bug that no one has noticed, or bothered to report before?

    I don't understand why your default is 2 pixels when all other controls/apps seem to use 1.
    Maybe you have an inner/outer border to handle 3D appearance but I dont see any way to specify 2 different color values.


  • Replied 8 September 2017, 2:52 pm EST


    I have entered a feature request for the future releases of Spread and the request id for the same is #99924289. However, I am working on creating a custom EnhancedScrollBarRenderer, I would get back to you if I am able to work out with the same.


    Manpreet Kaur

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels