The label component is very simple. It has no special behavior. It can provide the title and icon attributes for the component by placing the title and icon components.

Create label

There are two ways to create a label component.


Note: There are not only “title” and “icon” in the label component, you can place any component, such as placing as many texts, loaders, etc. The “title” and “icon” settings are only used for the label component to be set intuitively when the editor is instantiated.

Instance properties

Select a label component on the stage, and the property panel list on the right appears:

If “title” is input text, it will appear in the properties panelButton, click to enter the input settings panel. The setting method can refer to the text tutorial.


Set the title or icon of the label. You don’t need to force the object to be the type of GLabel. You can use the interface provided by GObject directly, for example:

GObject obj = gcom.GetChild ("n1");
    obj.text = "hello";
    obj.icon = "ui://package name/image name";

Modify the title color like this:

GLabel label = gcom.GetChild("n1").asLabel;
lable.titleColor = ...;

In addition, the label is also a standard component, so all methods of GComponent are available. For example, you can use GetChild to access any child component.