cancel
Showing results for 
Search instead for 
Did you mean: 

KeyWord "This"

So I'm working through the tutorials and I like to make small changes along the way when following along. I quickly noticed that there is no "this" keyword for accessing other properties within the same object.

Take this scenario for example.

I have a few buttons that are all different colors. I would like their hover state colors to look like a darker version of their idle state color.

To do this, I could easily use the ColorFade function for the HoverFill property. However I would need to supply it first with the color of the button itself. So you could copy and paste its color value, but this wouldn't be good if you changed the color scheme later. alternatively, you could access the color as a variable, but this would need you to type the name of the button in. For example HoverFill = ColorFade(Button1.Fill, -20%). This would be fine, but then I need to copy and paste this around and change the name for each Button; Button1, Button2, Button3, etc...

It would be helpful if there was a "this" keyword for controls that would allow you to access the other properties from within a function.

Thank you.

Status: New
Comments
WPB
Kudo Kingpin
Kudo Kingpin