- Home /
How do i move the vertical scrollbar thumb using left-mouse click and dragging it ?
I cannot move the vertical scrollbar thumb by using the left mouse-click and dragging it, but it can be moved when i use the mouse scroll wheel. I want it to be able to move using mouse-click as well because most of the users intend to do that first. Does anyone know why?
Actually its not the script. Its the GUI Skin. If i use the default skin then it works but if i use the a custom skin then it doesnt work.
I have made a custom GUI skin that seems to work. Here are some settings for it:
No left to right padding Top to bottom padding is 6
No margin
No overflow
No fixed height
Fixed width is 15
No stretch width
Stretches height.
Try applying some of this to your skin and see if that works.
Yes! That works. I had the same settings but the left Padding was 18 which caused the problem. Thank you.
See if there is a way to mark the question as answered because I answered in comments by accident.
Answer by ConfinedDarkness · Jul 26, 2011 at 07:17 PM
1 I have made a custom GUI skin that seems to work. Here are some settings for it:
No left to right padding Top to bottom padding is 6
No margin
No overflow
No fixed height
Fixed width is 15
No stretch width
Stretches height.
Try applying some of this to your skin and see if that works.
Answer by HyunMok_Moon · Oct 14, 2016 at 05:56 AM
BTW I worked in NGUI.
In UIScroll Bar container object, we can assign these in UIScrollBar component. Apperance Foreground as UISprite, Background as UISprite, Thumb as Thumb object, - UIButton and BoxCollider Direction Left to Right or Top To Button.
In UIScrollbar container, add component Box Collider size to scroll bar size,
In UIScrollbar container, add component UI Event Listener
In UIScrollView, there is Horizontal or Vertical scrollbars. Assign ScrollBar Container to here.
At first, I didn't assign Foreground and Box collider, Thumb is moved mouse wheel or Scollview drag. but Thumb is not grap and moved. After I assigned Foreground and Box collider then I can grap thumb and dragged OK.