MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / addButton

Function addButton

apps/automated/src/pages/page13.ts:27–35  ·  view source on GitHub ↗
(layout: layout.StackLayout, text: 'left' | 'center' | 'right' | 'stretch')

Source from the content-addressed store, hash-verified

25}
26
27function addButton(layout: layout.StackLayout, text: 'left' | 'center' | 'right' | 'stretch') {
28 var btn = new btns.Button();
29 btn.text = text;
30 btn.horizontalAlignment = text;
31 layout.addChild(btn);
32 layout.style.paddingLeft = 5;
33
34 return btn;
35}

Callers 1

createPageFunction · 0.85

Calls 1

addChildMethod · 0.45

Tested by

no test coverage detected