# Grouped Objects Cursors

**URL:** <https://forum.inductiveautomation.com/t/grouped-objects-cursors/4793>\
**Category:** Ignition\
**Created:** [July 9, 2012, 10:03pm UTC](https://forum.inductiveautomation.com/t/grouped-objects-cursors/4793 "2012-07-09T22:03:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlexW](https://avatars.discourse-cdn.com/v4/letter/a/b5a626/32.png) [@AlexW](https://forum.inductiveautomation.com/u/AlexW)\
**Post date:** [July 9, 2012, 10:03pm UTC](https://forum.inductiveautomation.com/t/grouped-objects-cursors/4793/1 "2012-07-09T22:03:21Z")

</div>

Is there a way of applying a cursor to a grouped object?

I have a motor graphic in a component pallete that I am wanting to apply a cursor to. It consists of a bunch of lines and one rectangle combined into one group. I can apply the cursor to the rectangle but it does not appear when hovering over it (I believe the group setting is overriding this)

The group properties do not seem to support different cursors (I can’t see any option for this). I get the following error message when trying to set it manually and run the folowing code in a mouse enter event assigned to the group.

`Traceback (most recent call last):
  File "<event:mouseEntered>", line 7, in <module>
AttributeError: 'NoneType' object has no attribute 'setCursor'
`

`#Available Cursors are as follows
#DEFAULT_CURSOR
#HAND_CURSOR
import java.awt
component = event.source.parent.getComponent("componentName")
defaultCursor = java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.HAND_CURSOR)
component.setCursor(defaultCursor)`

Thoughts? Possible feature request?

---

<div class="post-metadata">

**Author:** ![James.Lorenz](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/james.lorenz/32/3290_2.png) [@James.Lorenz](https://forum.inductiveautomation.com/u/James.Lorenz)\
**Post date:** [July 9, 2012, 10:32pm UTC](https://forum.inductiveautomation.com/t/grouped-objects-cursors/4793/2 "2012-07-09T22:32:22Z")

</div>

I was able to use your script without errors…can you attach the component in question?

---

<div class="post-metadata">

**Author:** ![AlexW](https://avatars.discourse-cdn.com/v4/letter/a/b5a626/32.png) [@AlexW](https://forum.inductiveautomation.com/u/AlexW)\
**Post date:** [July 9, 2012, 10:41pm UTC](https://forum.inductiveautomation.com/t/grouped-objects-cursors/4793/3 "2012-07-09T22:41:29Z")

</div>

uploaded.

I’m trying to apply the script to the group. Not the components inside the group.  
[ONESCADA\_testwindow\_2012-07-09\_1439.proj](https://us1.discourse-cdn.com/inductiveautomation/original/2X/7/7faf058a4a8fda5cdd823d4d10e2cd016f54415b.proj) (6.56 KB)

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [July 10, 2012, 12:12am UTC](https://forum.inductiveautomation.com/t/grouped-objects-cursors/4793/4 "2012-07-10T00:12:04Z")

</div>

You have to convert the group to a container to do this. So right click on the group and select “Convert to Container”

---

<div class="post-metadata">

**Author:** ![AlexW](https://avatars.discourse-cdn.com/v4/letter/a/b5a626/32.png) [@AlexW](https://forum.inductiveautomation.com/u/AlexW)\
**Post date:** [July 10, 2012, 4:56pm UTC](https://forum.inductiveautomation.com/t/grouped-objects-cursors/4793/5 "2012-07-10T16:56:28Z")

</div>

Thanks for the help

Just a quick question. What is the difference between groups and containers? Where do each of them fit in the Ignition grand scheme of things? Will they be combined in some update in the future?

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [July 11, 2012, 3:23pm UTC](https://forum.inductiveautomation.com/t/grouped-objects-cursors/4793/6 "2012-07-11T15:23:21Z")

</div>

Here is the difference:

> [@](#):
>
> Shapes and components can be grouped together so that they act like a single component in the Designer. Grouping components is very similar to putting them in a Container. In fact, it is the same thing as cutting and pasting them into a perfectly-sized container and then putting that container into group mode, with one exception. If the group contains only shapes and no other kinds of components, it will be a special shape-group that has the ability to be rotated and has some other shape-like properties.

Look at this page in the user manual:

[http://www.inductiveautomation.com/support/usermanuals/ignition/grouping.htm](http://www.inductiveautomation.com/support/usermanuals/ignition/grouping.htm)
