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. Dismiss Notice

How to make scrollview panels without showing scrollbars?

Discussion in 'UGUI & TextMesh Pro' started by asperatology, Nov 25, 2015.

  1. asperatology

    asperatology

    Joined:
    Mar 10, 2015
    Posts:
    981
    I want to make a slideable (Spelling is correct?) panel without showing any scrollbars in Unity UI. It's the type of slideable panels where the user would drag with the mouse left, right, up, or down, where the scrollbars will not show up or appear when the panels are moving.

    It's like the slideable menu taskbar in Blender, where the user would hold down the mouse wheel to pan the taskbar left or right. The menu taskbar is located where you would choose your mesh's Material or do some World properties setting modifications, usually located on the user's right hand side. That taskbar doesn't have any scrollbars, and I liked for that simplicity to be in the Unity UI.

    If Unity UI doesn't support slideable panels without scrollbars showing up, is there a way I can make the scrollbar be as thin as possible? Around 1 to 2 pixels thick (tall for horizontal, wide for vertical)?

    Thanks.
     
  2. SimonDarksideJ

    SimonDarksideJ

    Joined:
    Jul 3, 2012
    Posts:
    1,683
    The ScrollView will give you that. If you want a more applied way of implementing it, then check out the 3 ScrollSnap controls in the UI Extensions project (link in sig)
     
  3. asperatology

    asperatology

    Joined:
    Mar 10, 2015
    Posts:
    981
    Yes, but the scrollview requires a scrollbar in order to slide the panel, and I don't want the scrollbar.
     
  4. SimonDarksideJ

    SimonDarksideJ

    Joined:
    Jul 3, 2012
    Posts:
    1,683
    Nope. The ScrollView also works with touch and scrollwheel. But check the ScrollSnap controls for other examples
     
  5. asperatology

    asperatology

    Joined:
    Mar 10, 2015
    Posts:
    981
    I'm confused. There's a setting where you can turn off ScrollBars?
     
  6. SimonDarksideJ

    SimonDarksideJ

    Joined:
    Jul 3, 2012
    Posts:
    1,683
    No, you simply don't attach them. Or if you have them, simply delete the scrollbar and remove the reference in the inspector. Works fine without them.
     
  7. asperatology

    asperatology

    Joined:
    Mar 10, 2015
    Posts:
    981
    That did the trick. Thanks.
     
    mmmshuddup and SimonDarksideJ like this.
  8. Fattie

    Fattie

    Joined:
    Jul 5, 2012
    Posts:
    475
    You know what's weird. In the current Unity (jan 2016), it appears IT DOES NOT SHOW the scrollbars

    So, by default it shows no scrollbars (indeed oddly, I can't get them to appear! strange)

    I wanted no-scrollbars, so that is fine :)
     
  9. Gilwing

    Gilwing

    Joined:
    Jun 21, 2014
    Posts:
    2
    That worked perfectly! Thanks!
     
  10. BottleTopStudios

    BottleTopStudios

    Joined:
    Feb 24, 2015
    Posts:
    2
    i found that disabling the Image component on the the scroll bars worked for me, they still scroll but the scroll bars are invisible, if nothing else works
     
    wzkiro likes this.
  11. DevArturio

    DevArturio

    Joined:
    Jan 5, 2019
    Posts:
    2
    Changing all scroll bar colors to transparent worked for me :)
     
  12. Masteraider73

    Masteraider73

    Joined:
    Aug 5, 2018
    Posts:
    2
    wow. none of these worked for me lol
     
  13. Ikaro88

    Ikaro88

    Joined:
    Jun 6, 2016
    Posts:
    280
    just add a canvas group and put alpha to 0
     
  14. mmmshuddup

    mmmshuddup

    Joined:
    Feb 9, 2015
    Posts:
    4
    This worked for me as well. Thanks!