Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Scrollbar Spin Buttons

Discussion in 'UGUI & TextMesh Pro' started by MacMarc, Oct 3, 2016.

  1. MacMarc

    MacMarc

    Joined:
    Sep 16, 2016
    Posts:
    1
    Hey coders,

    I have an Scrollbar which works fine, but I'd like to have these arrow buttons above and under the scrollbar, to manually scroll per click. (See pic)

    Scrollbars.png

    Is there any way to do these buttons with the Scrollbar-UI-Object or must I create them manually?

    Thx in advance,
    MacMarc
     
  2. IzzySoft

    IzzySoft

    Joined:
    Feb 11, 2013
    Posts:
    376
  3. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637
    @MacMarc

    I think you have to add them manually.

    If you want little less total change as suggested by @IzzySoft, you can add separate buttons above and below your scrollbar, then create a simple OnClick script to modify ScrollBar.value to make it move up or down based on which button you press.

    I don't remember what exactly happened if you had ScrollRect then modify it's scrollbar value, I do remember it was two way, so it wouldn't cause problems to ScrollRect position - I think.
     
    MacMarc likes this.