Description

In this lesson, we'll take a look at reviewing and configuring properties of Perspective components.

Video recorded using: Ignition 8.0

Transcript

(open in window)

[00:00] In this lesson, we'll take a closer look at properties on Perspective components. So when I have a component selected here, you can see that we have in the Property Editor, different categories. These categories allow us to organize the properties under a specific theme. Starting with the props properties here, these control how the component appears or behaves in the session. So if I were to, on this LED Display, change the value property, you'll see it appear on the component. Position properties dictate where the component is inside of its container. And they're also driven by the type of the container the component's in. The meta category shows common properties that all components have. Things like the name, or whether or not the component is visible. And then we have the custom category. Which is an ideal place for you to create your own properties. For example, if I click on the little plus icon here, I can add a new custom property, and I just need to pick a type. So if you wanted to add just a single property, you can select value, you'll see that it has a key and a value here for us. So if I replace the key here, that's effectively renaming the property to something else. And then I can change the value by typing over here. So if you want a string for the value you type a string, if you want a number, you type in a number. Now, for any of these properties here, if you right click on the name, you'll see a right click menu, with a number of options such as copying, pasting, or deleting. Now I wanted to show you if I duplicate this one property here, it will add an additional property down below, but names within a particular category, have to be unique. You'll also see that if I hover over this little icon, I get a couple of warnings, telling me about the duplicate keys. So in this case, I can just double click on the name of one of them, change the name to something else, and that clears the warning. Now if I need to add more properties here, and I don't want to duplicate, you'll notice that I can move my mouse cursor just above or below a particular property, that gives me the little plus icon again, or I can simply right click on one of these, and insert a new property. Now we have a couple of other types. You can see that there is an array down here, so if I create a new array property, and I'll give this one a name as well, you can see that I can start adding array properties with a plus icon down below. And they work the same otherwise, I can simply change the value by typing into the value field. Now I can also right click on a property, and under Structure, so not the Insert menu item, but you can see that there's actually in this case, an Array item, that has some sub items. It states Array here because this one property is an Array. If I were to right click on my prop, you can see that it shows it's a value property. This item here allows you to change the type of the property. So I could change my prop to an object instead. An object is similar to an array, except each item you add, allows you to specify a new key name. So I could create a parent property and then a bunch of sub properties, using either an Array, or if I wanted to reference the sub properties by name, an Object. And of course, if you need to get rid of a property, you can simply right click on the property, and select Delete. Now I've been showing you this right click menu from the custom category. But in Perspective, you can add and remove properties from any of these categories you want. We just recommend you use the custom category for your custom properties. So for example, I could come up to the props properties here, right click on value up here, and insert a new value type property. And you'll see that the key item appears down below. Now when you're adding a property to these other categories, they otherwise work the same as properties added to the custom category. So you have to have a unique name for each property, for example. However, you do want to be careful, if you were to remove some of the built in properties, so for example if I were to right click on value here, and delete it, it removes that functionality from the component, so you can see that my LED display, no longer is showing a value. Now this is easy enough to fix, I can simply click the undo button, or I can just add a new property here, type in value for the name of the property, and you can see that it starts working again. Now if you ever do delete any of these properties here, you can always check the component reference in the appendix of the Ignition User Manual, for a full list of available properties, as well as what they do.

You are editing this transcript.

Make any corrections to improve this transcript. We'll review any changes before posting them.