Book Image

LiveCode Mobile Development Cookbook

By : Dr. Edward Lavieri
Book Image

LiveCode Mobile Development Cookbook

By: Dr. Edward Lavieri

Overview of this book

Table of Contents (17 chapters)
LiveCode Mobile Development Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Setting custom properties


LiveCode's objects come with an impressive number of properties that help us control how they look and function. We can also add our own properties to objects called custom properties. This provides us with a tremendous amount of flexibility.

How to do it...

Follow these steps to set the custom properties:

  1. Create a main stack.

  2. Drag any object onto the stack's card (for example, a button).

  3. Select an object that you wish to add custom properties to.

  4. Right-click on the object and select Property Inspector.

  5. Using the property inspector, select Custom Properties. You should see an interface similar to the one displayed in the following screenshot:

  6. Click on the plus sign to add a new custom property:

  7. Enter a name for the custom property and click on OK. For example, you might want to use a button to represent a book in a game. Add the custom properties, bookTitle, bookYear, bookAuthor, bookPublisher, until your display matches the following screenshot:

  8. Next, we will add content...