[Containers] ListView
Adding A ListView
Drag a ListView from the Widgets section onto the middle canvas.

Selecting The ListView
You can select the ListView if it isn't already selected from the Animation Editor at the bottom. The ListView doesn't appear in the resources as it's part of the Scene or other object that you are using.
ListView are used as a way of grouping objects together. To add objects to your ListView you simply drag any object onto the panel. All transformations applied to the ListView will affect it's children as well.

Modifying The ListView
You can change the ListView background file. Setting the ListView's background file can be done by double clicking on the section or dragging an image from the Resources section.
To hide the objects inside the ListView that are out of bounds you simply enable Clipping.

Accessing The ListView In Code
ListView's can be accessed via their Name or Tag which can be set in the Properties section.

To access the ListView from a scene for example, in code it is simple. You either access it as a Node or cast it to a ListView allowing you to use ListView methods along with Node methods.
Node *rootNode = CSLoader::createNode( "Filepath to .csb file" );
this->addChild( rootNode );
// ListView accessed as a node using it's name
Node *listView = rootNode->getChildByName( "Name set in Cocos Studio" );
// ListView cast to a ListView using it's name
cocos2d::ui::ListView *listView = ( cocos2d::ui::ListView * )rootNode->getChildByName( "Name set in Cocos Studio" );
// ListView accessed as a node using it's tag
Node *listView = rootNode->getChildByTag( 5 );
// ListView cast to a ListView using it's tag
cocos2d::ui::ListView *listView = ( cocos2d::ui::ListView * )rootNode->getChildByTag( 5 );
var rootNode = ccs.load( "Filepath to .json file" );
this.addChild( rootNode.node );
// get the ListView by name
var listView = rootNode.node.getChildByName( "Name set in Cocos Studio" );
// get the ListView by tag
var listView = rootNode.node.getChildByTag( 5 );
Note: Cocos2d-JS doesn't require casting to use ListView methods.
Updated about 2 months ago