# Component Event Property Methods

**URL:** <https://forum.inductiveautomation.com/t/component-event-property-methods/30982>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [December 30, 2019, 9:15pm UTC](https://forum.inductiveautomation.com/t/component-event-property-methods/30982 "2019-12-30T21:15:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![thomas.harvey](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/thomas.harvey/32/12474_2.png) [@thomas.harvey](https://forum.inductiveautomation.com/u/thomas.harvey)\
**Post date:** [December 30, 2019, 9:15pm UTC](https://forum.inductiveautomation.com/t/component-event-property-methods/30982/1 "2019-12-30T21:15:38Z")

</div>

Is there any documentation on the methods associated with component event properties? For example, in a problem solved on another thread, the solution used a method:

“event.source.putClientProperty(‘singleClick’, True)” where ‘singleClick’ was an event property and ‘True’ was the value to set it to.

There was also a similar “getClientProperty” method. I cannot find references to these methods by searching in the user manual. I also wonder what other methods might be available. These were not custom methods. I was able to use them in my script as written. I appreciate it if anyone can help me find any lists or documentation that may exist about these methods.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [December 30, 2019, 9:25pm UTC](https://forum.inductiveautomation.com/t/component-event-property-methods/30982/2 "2019-12-30T21:25:58Z")

</div>

The method `putClientProperty` adds a new property to the component it’s called on. In this instance, @witman was adding a property called `singleClick` to the button component and setting its value to `true`.

So `singleClick` was an added custom property. `putClientProperty` and `getClientProperty` are methods available to objects that inherit from the `javax.swing.JComponent` class.

The [javadocs](http://files.inductiveautomation.com/sdk/javadoc/ignition79/795/index.html) will show you what methods and properties are available to all Ignition classes, but these all inherit from standard Java and Java Swing which you’ll need to view their own documentation to see more details.

You’ll need to know the object type that you’re trying to see the methods/properties for, and in Python you can use `type(...)`  
E.g.

```auto
print type(event.source)
> <type 'com.inductiveautomation.factorypmi.application.FPMIWindow'>

```

Then search for the last element `FPMIWindow` in the javadocs

As a side note, you can actually add python function objects themselves to Ignition windows using the `putClientProperty` which is sometimes useful.

---

<div class="post-metadata">

**Author:** ![thomas.harvey](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/thomas.harvey/32/12474_2.png) [@thomas.harvey](https://forum.inductiveautomation.com/u/thomas.harvey)\
**Post date:** [December 30, 2019, 9:32pm UTC](https://forum.inductiveautomation.com/t/component-event-property-methods/30982/3 "2019-12-30T21:32:55Z")

</div>

OK. Thanks. I will check it out.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [December 30, 2019, 9:34pm UTC](https://forum.inductiveautomation.com/t/component-event-property-methods/30982/4 "2019-12-30T21:34:35Z")

</div>

I edited the example script as it was missing the print statement, fyi

---

<div class="post-metadata">

**Author:** ![Marek\_Bahnik](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@Marek\_Bahnik](https://forum.inductiveautomation.com/u/Marek_Bahnik)\
**Post date:** [April 4, 2023, 12:13pm UTC](https://forum.inductiveautomation.com/t/component-event-property-methods/30982/5 "2023-04-04T12:13:47Z")

</div>

Could you please elaborate on the last sentence?

> As a side note, you can actually add python function objects themselves to Ignition windows using the putClientProperty which is sometimes useful.

Maybe if you have some code example or additional information, that'd be great! I'm struggling with very similar problem and this would help me a lot. Thank you!
