Sep
30
2011
Controlling Component Placement in Custom Kinds
In this article, I want to share how you can help ensure that your custom kind’s components are contained where you want them to be. Let’s start with the following example: Here is a kind that is simply a VFlexBox with a Header (for a header), a Scroller (for holding whatever gets added later), and a Toolbar (for a footer): enyo.kind({ name: “MyKind”, kind: enyo.VFlexBox, components: [ {name: "header", kind: enyo.Header, content: "Header"}, {name: "scroller", kind: enyo.Scroller, flex: 1}, {name: "footer", kind: enyo.Toolbar} ], create: function() { this.inherited(arguments); } });



