This repository was archived by the owner on Aug 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 226
Expand file tree
/
Copy pathcreate-widget.lcdoc
More file actions
75 lines (54 loc) · 2.33 KB
/
create-widget.lcdoc
File metadata and controls
75 lines (54 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
Name: create widget
Type: command
Syntax: create [invisible] widget [<controlName>] as <widgetKind> [in {<group>|<card>}]
Summary:
Create a <widget> control of the specified <kind>.
Associations: widget
Introduced: 8.0
OS: mac, windows, linux, ios, android
Platforms: desktop, server, mobile
Example:
create widget "My Navbar" as "com.livecode.widget.navbar"
Example:
create group "Swatches"
repeat with x = 1 to 20
create invisible widget ("Color Swatch" \
&& x) as "com.livecode.widget.colorswatch" in group "Swatches"
end repeat
Parameters:
controlName:
The name to call the newly created <widget>. If you don't specify a
name, the <widget> is created with a default name.
widgetKind:
The name of the module that defines the widget to be created.
group:
A reference or an expression that evaluates to a reference to a group on
the current card. If you specify a group, the new <widget> is a member
of the <group>, and exists on each <card> that has the <group>. If you
don't specify a <group>, the <widget> is created on the current <card>
and appears only on that <card>.
card:
A reference or an expression that evaluates to a reference to a card.
If you specify a card, the new <widget> is a member of the <card>.
If you specify neither a <group> nor a <card>, the <widget>
is created on the current <card> and appears only on that <card>.
It:
The <create widget> command places the ID property of the newly created
<widget> in the <it> variable.
Description:
Use the <create widget> command to make a new <widget> control or
grouped <widget> control of <kind> <widgetKind>.
If you use the invisible form, the <widget> is created with its
<visible> property set to false, so it cannot be seen. Use this form to
create a hidden <widget>, change its appearance or position, then make
it visible.
When the new <widget> is created, the pointer tool is automatically
chosen.
>*Note:* The <LCB extension|extension> of the specified <kind> must have
> been loaded using the <load extension> command. To see a list of the
> currently loaded <LiveCode Builder extension|extensions>, use the
> <loadedExtensions> <function>.
References: load extension (command), loadedExtensions (function),
LiveCode Builder extension (glossary), it (keyword), widget (object),
card (object), group (object), kind (property), visible (property)
Tags: objects, extensions