LAVA Forums Buy cool LAVA gear Forums RSS Feed

Welcome Guest ( Log In | Register )

> Related links

Check out our User Interface Code Repository Files or visit the LabVIEW Wiki User Interface Portal


Tags
(This content has not been tagged yet)
 
Reply to this topic Start new topic
> Labels interfere with mouse events in XY graph
Phil Duncan
post May 22 2007, 02:12 AM
Post #1


Very Active
***

Member
Posts: 58
Joined: 26-April 06
From: Adelaide
Member No.: 4848
Using LabVIEW Since:2002
LV:8.5 ,8.2.1 ,7.1.1
Australia Nothing Selected Nothing Selected


Hi all,

I am trying to allow a user to interact with a special XY plot. The goal is to have them click on the XY-plot and draw (plot) a point where the user clicks and maintain the position of the point on the XY plot under the mouse until they click again. The problem is that this XY-plot has labels on it that interfere with the mouse. A cursor appears in the plot area but the "operate" cursor appears when the mouse is over the labels and I can't trap a mouse event. I can turn off/on the labels with a mouse enter/leave event but that makes the labels invisible while the mouse is in the plot area which it will be for most of the time. The labels must be in front of the plot area to be visible.

I am looking for some fresh ideas to help circumvent this problem. Here is a pic of the plot for assistance.
Attached Image


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Ad
post May 22 2007, 02:12 AM
Post #















Tags
(This content has not been tagged yet)
Go to the top of the page
Quote Post
Ton
post May 22 2007, 04:23 AM
Post #2


CCT It
*****

Premium Member
Posts: 1331
Joined: 13-June 05
From: Woerden, Netherlands
Member No.: 2399
Using LabVIEW Since:2001
LV:8.5.1 ,6.1 ,8.2.1
Netherlands hol_utrecht Nothing Selected My Blog My Gallery


Hi Phil,

In LabVIEW 8 you can add an image in front of the plotted data in graphs, I don't know if this goes for XY as well, but I think so. Maybe that is your way to got (and I think it can reduce your code as well).

Ton

--------------------
Certified LabVIEW Developer
Shouldn't you be programming a Code Repository solution?


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Michael_Aivaliot...
post May 22 2007, 04:39 AM
Post #3


Confucius say: Crowded elevator always smell different to midget
Group Icon
*****

Admin
Posts: 2363
Joined: 13-October 02
From: Planet Earth
Member No.: 2
Using LabVIEW Since:1994
LV:8.5 ,8.2.1 ,7.1.1
Greece Canada United States My Blog My Gallery


Can you attach a new VI with your graph on the panel and a constant with data fed to it? I want to try a few things.

--------------------


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Phil Duncan
post May 22 2007, 05:20 AM
Post #4


Very Active
***

Member
Posts: 58
Joined: 26-April 06
From: Adelaide
Member No.: 4848
Using LabVIEW Since:2002
LV:8.5 ,8.2.1 ,7.1.1
Australia Nothing Selected Nothing Selected


QUOTE (Michael_Aivaliotis @ May 22 2007, 02:09 PM) *
Can you attach a new VI with your graph on the panel and a constant with data fed to it? I want to try a few things.


Sure, here is a stripped down version that should help.

Cheers & Beers
thumbup1.gif beer_mug.gif
Attached File  Course_display_demo.vi ( 93.32K ) Number of downloads: 105


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Jon Sweeney
post May 22 2007, 12:51 PM
Post #5


More Active
**

Member
Posts: 30
Joined: 3-July 03
From: Long Island, NY
Member No.: 133
Using LabVIEW Since:1993
LV:8.20 ,. ,.
United States us_new_york Nothing Selected


Phil,

Nice looking plot.

See if this works for you:
1) move your labels to the back
2) color the black part and the silver frame of your plot transparent
3) color the background of the front panel black
The plot labels now show and don't interfere.
This now looks almost like your original except the other controls are surrounded by black.
You could put the other controls on a decoration or a cluster as a background.Attached File  Course_display_demo_JBS.vi ( 78.26K ) Number of downloads: 100

Or, as an alternative to coloring the front panel black, put the plot on a black decoration and move the labels forward so they are between the decoration and the plot.

Jon

This post has been edited by Jon Sweeney: May 22 2007, 01:00 PM

--------------------
Jon Sweeney


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Phil Duncan
post May 23 2007, 12:39 AM
Post #6


Very Active
***

Member
Posts: 58
Joined: 26-April 06
From: Adelaide
Member No.: 4848
Using LabVIEW Since:2002
LV:8.5 ,8.2.1 ,7.1.1
Australia Nothing Selected Nothing Selected


QUOTE (Jon Sweeney @ May 22 2007, 10:21 PM) *
Or, as an alternative to coloring the front panel black, put the plot on a black decoration and move the labels forward so they are between the decoration and the plot.

Jon


Thanks for your suggestions Jon, I like the second option with a black decoration under the XY plot. Unfortunately, plotted data covers up the labels because they are behind the data. The first picture in this thread represents a typical data set to be plotted and as you can imagine, with the labels sitting behind the data I can't see some of them.

I guess I need a way of having the labels in front of the data but tell LabVIEW to ignore them as an interactive item. So we are back where we started.

Cheers & Beers
thumbup1.gif beer_mug.gif


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
JFM
post May 23 2007, 06:39 AM
Post #7


Extremely Active
****

Member
Posts: 369
Joined: 24-August 06
Member No.: 5958
Using LabVIEW Since:1995
LV:8.5 ,8.2.1 ,7.1.1
Sweden Nothing Selected Nothing Selected


QUOTE (Phil Duncan @ May 23 2007, 02:39 AM) *
Thanks for your suggestions Jon, I like the second option with a black decoration under the XY plot. Unfortunately, plotted data covers up the labels because they are behind the data. The first picture in this thread represents a typical data set to be plotted and as you can imagine, with the labels sitting behind the data I can't see some of them.

I guess I need a way of having the labels in front of the data but tell LabVIEW to ignore them as an interactive item. So we are back where we started.

Cheers & Beers
thumbup1.gif beer_mug.gif

Phil,

maybe this is a long shot, but have you tried using annotations to programmatically set the labels?
This way the "labels" would be part of the plot itself.

/J

--------------------
Wired but not weird...


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Jon Sweeney
post May 23 2007, 11:48 AM
Post #8


More Active
**

Member
Posts: 30
Joined: 3-July 03
From: Long Island, NY
Member No.: 133
Using LabVIEW Since:1993
LV:8.20 ,. ,.
United States us_new_york Nothing Selected


QUOTE (JFM @ May 21 2007, 08:12 PM) *
The labels must be in front of the plot area to be visible.

oops, sorry, I missed that part.

Jon

--------------------
Jon Sweeney


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Phil Duncan
post May 24 2007, 08:35 AM
Post #9


Very Active
***

Member
Posts: 58
Joined: 26-April 06
From: Adelaide
Member No.: 4848
Using LabVIEW Since:2002
LV:8.5 ,8.2.1 ,7.1.1
Australia Nothing Selected Nothing Selected


QUOTE (JFM @ May 23 2007, 04:09 PM) *
Phil,

maybe this is a long shot, but have you tried using annotations to programmatically set the labels?
This way the "labels" would be part of the plot itself.

/J


Fantastic! That did the trick.
I had to disable "Allow dragging" but now the annotations sit over the data and don't interfere with the user clicking on the XY-plot.

Thank you very much smile.gif

Cheers & Beers
thumbup1.gif beer_mug.gif


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
JFM
post May 24 2007, 09:32 AM
Post #10


Extremely Active
****

Member
Posts: 369
Joined: 24-August 06
Member No.: 5958
Using LabVIEW Since:1995
LV:8.5 ,8.2.1 ,7.1.1
Sweden Nothing Selected Nothing Selected


QUOTE (Phil Duncan @ May 24 2007, 10:35 AM) *
Fantastic! That did the trick.
I had to disable "Allow dragging" but now the annotations sit over the data and don't interfere with the user clicking on the XY-plot.

Thank you very much smile.gif

Cheers & Beers
thumbup1.gif beer_mug.gif

You're welcome.

Would you mind uploading the version using the annotations, to help others facing the same problem?

/J

--------------------
Wired but not weird...


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post

Reply to this topicStart new topic

 




Time is now: 22nd November 2008 - 02:11 AM