MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / addChild

Function addChild

apps/ui/src/events/layout-changed-event-page.ts:11–19  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

9}
10
11export function addChild(args) {
12 let button = new Button();
13 button.text = 'Button' + buttonsCount;
14 button.margin = 10;
15 button.backgroundColor = 'lightgreen';
16
17 (<StackLayout>args.object.page.getViewById('target')).addChild(button);
18 buttonsCount++;
19}
20
21export function clear(args) {
22 (<StackLayout>args.object.page.getViewById('target')).removeChildren();

Callers

nothing calls this directly

Calls 1

addChildMethod · 0.45

Tested by

no test coverage detected