Skip to content

format

typescript
Control.form

class: Control

description

The Form that the current control belongs to.

A Form is a container in the user interface that is used to host and organize other UI elements (such as buttons, text boxes, images, etc.) to build a user interactive interface.

parameter

param_nametypedescription

reture

typedescription
Form|nullThe Form that the control belongs to.

code example

typeScript
let go = new GameObject("ui");
let uiComponent = go.AddComponent<UIComponent>(UIComponent);
let canvas = uiComponent.canvas;		
let button = canvas.FindChild("Button");
button.form;