Error getting tags :
error 404Error getting tags :
error 404 create | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Expander triangle
create [invisible] type [name] [in group]
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
None required
Creates a new object on the current card.

create button "Click Me"
create invisible field in first group

Additional Comments
Expander triangle

Use the create command to make a new control or grouped control.


The type is any control that can be on a card: field, button, image, scrollbar, graphic, player, or EPS.

The name is the name of the newly created object. If you don't specify a name, the object is created with a default name.

The group is any group that's on the current card. If you specify a group, the new object is a member of the group, and exists on each card that has the group. If you don't specify a group, the object is created on the current card and appears only on that card.


The new object takes its properties from the corresponding template; for example, newly created buttons match the properties of the templateButton.

If you use the create invisible form, the object is created with its visible property set to false, so it cannot be seen. Use this form to create a hidden object, change its appearance or position, then make it visible.

The create command places the ID property of the newly created object in the it variable.

When the new control is created, the Pointer tool is automatically chosen. If you use the create command in a handler, you can use the following statement after the create command to resume using the Browse tool:

send "choose browse tool" to me in 1 tick

Note: In the development environment, after an object is created, Revolution automatically resets the corresponding template to its default values. This means that if you change an objecttemplate and then create several objects of that type, only the first object will reflect your settings. To prevent Revolution from automatically setting the template back to its defaults, set the lockMessages property to true before creating the objects:

set the borderWidth of the templateButton to 8

lock messages

repeat for 5 times

create button

end repeat

unlock messages

Revolution resets the template only when in the development environment, not in standalone applications.

Tip: To create a control in a specific stack, first set the defaultStack to the stack where you want to create the new control:

set the defaultStack to "My Stack"

create button "My Button"

User Comments
Expander triangle
User thumbnail
Craig Newman (dunbarx)
Jun 23, 2010
This command is not limited to controls on a card. It would also create a new stack.