It is currently Wed Sep 17, 2014 1:32 am




Post new topic Reply to topic  [ 6 posts ] 
 Grouped Objects Cursors 
Author Message
General
General

Joined: Tue Oct 26, 2010 5:58 pm
Posts: 152
Post Grouped Objects Cursors
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.
Code:
Traceback (most recent call last):
  File "<event:mouseEntered>", line 7, in <module>
AttributeError: 'NoneType' object has no attribute 'setCursor'


Code:
#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?


Mon Jul 09, 2012 2:03 pm
Profile
Moderator
Moderator

Joined: Mon Jun 04, 2012 8:53 am
Posts: 440
Post Re: Grouped Objects Cursors
I was able to use your script without errors...can you attach the component in question?

_________________
James Lorenz
QA/Build Systems Engineer
Inductive Automation


Mon Jul 09, 2012 2:32 pm
Profile
General
General

Joined: Tue Oct 26, 2010 5:58 pm
Posts: 152
Post Re: Grouped Objects Cursors
uploaded.

I'm trying to apply the script to the group. Not the components inside the group.


Attachments:
ONESCADA_testwindow_2012-07-09_1439.proj [6.56 KiB]
Downloaded 64 times
Mon Jul 09, 2012 2:41 pm
Profile
Moderator
Moderator

Joined: Sun Apr 02, 2006 2:46 pm
Posts: 1982
Location: Sacramento, CA
Post Re: Grouped Objects Cursors
You have to convert the group to a container to do this. So right click on the group and select "Convert to Container"

_________________
Travis Cox
Inductive Automation
Technical Support Rep.


Mon Jul 09, 2012 4:12 pm
Profile WWW
General
General

Joined: Tue Oct 26, 2010 5:58 pm
Posts: 152
Post Re: Grouped Objects Cursors
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?


Tue Jul 10, 2012 8:56 am
Profile
Moderator
Moderator

Joined: Sun Apr 02, 2006 2:46 pm
Posts: 1982
Location: Sacramento, CA
Post Re: Grouped Objects Cursors
Here is the difference:

Quote:
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

_________________
Travis Cox
Inductive Automation
Technical Support Rep.


Wed Jul 11, 2012 7:23 am
Profile WWW
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: