Author Topic: ScrollView Horizontal and Vertical Scrollbars for NxN Grid.  (Read 1752 times)

wallabie

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 200
    • View Profile
ScrollView Horizontal and Vertical Scrollbars for NxN Grid.
« on: March 09, 2014, 10:57:27 AM »
I was wondering if the ScrollView supports scrolling both Horizontally and Vertically.

For example, is it possible a scrollView component that contains a grid that is is 10 X 10 items and for this scrollview to have both a horizontal and vertical scrollbars.

Here is a scroll panel example from DaikonForge.

« Last Edit: March 09, 2014, 11:25:47 AM by wallabie »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: ScrollView Horizontal and Vertical Scrollbars for NxN Grid.
« Reply #1 on: March 10, 2014, 08:45:58 PM »
Of course. The only restriction is on the mouse wheel type movement, since it's not two-dimensional.

wallabie

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 200
    • View Profile
Re: ScrollView Horizontal and Vertical Scrollbars for NxN Grid.
« Reply #2 on: March 10, 2014, 09:47:25 PM »
Will this also support Drag and Drop operations. 
For example, in the picture, is it possible to select one item and reorder its position via drag and drop ?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: ScrollView Horizontal and Vertical Scrollbars for NxN Grid.
« Reply #3 on: March 11, 2014, 06:06:12 PM »
Reorder it how? It's up to you how things get positioned. UIGrid makes it possible to easily align things for some quick-and-simple positioning. It also makes it possible to automatically drop the item in between of others and have it remain there, but that logic only works for horizontal or vertical sorting. In a two-dimensional grid it's up to you to determine where in the grid the item should be positioned, so you will need to write some code.

wallabie

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 200
    • View Profile
Re: ScrollView Horizontal and Vertical Scrollbars for NxN Grid.
« Reply #4 on: March 12, 2014, 12:10:41 AM »
Would you consider a request for creating an example, like in the case of DaikonForge, a NxN drag and drop resizable demo.  The reason is that this is quite a common GUI component and has many applications.  It would be a Great example of how to make a more advanced component using NGUI's new features.
 
DaikonForge demos include a range from simple to more advanced covering many of the common use cases.  Their demos help to show off the power and flexibility of their system.