Search
ListContainer.fromJson Method
See Also
 






Deserializes items from a JSON string.

Namespace: MindFusion.Common.UI
File: ListContainer.js

 Syntax

JavaScript  Copy Code

function fromJson (json)

 Parameters

json

String. A string created by the toJson method.

 Example

The following code loads a ToolStrip, which is of type ListContainer, from a Json file:

JavaScript  Copy Code
 // create a new instance of the ListContainer control
    var toolstrip = new ui.ToolStrip(document.getElementById("listcontrol"));
    toolstrip.width = new ui.Unit(100, ui.UnitType.Pixel);
    toolstrip.height = new ui.Unit(100, ui.UnitType.Percent);
    toolstrip.itemSize = new ui.Unit(50);
    toolstrip.orientation = ui.Orientation.Vertical;
    toolstrip.collapsible = true;
    toolstrip.scrollable = false;
    toolstrip.theme = theme;
    toolstrip.fromJson("myJsonFile.json");

 See Also