LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Mouseover in Labview

Is it possible to do a mouseover type function in Labview where when the
mouse is over a button that a certain picture can be displayed. Thanks.

Dewayne
0 Kudos
Message 1 of 8
(3,460 Views)
X3aD wrote:

> Is it possible to do a mouseover type function in Labview where when the
> mouse is over a button that a certain picture can be displayed. Thanks.
>
> Dewayne

I dont think you can do a picture, but in LV 6i you can display text
like when you mouseover the items in the tool bar.

Right click the control and you will see the menu item.
Kevin
0 Kudos
Message 2 of 8
(3,460 Views)
Dewayne,

I use the picture control when I want a mouseover effect. The control has
a mouse attribute that you can monitor in a while loop, when the attribute
= -1 the mouse isn't over the control, so you can wire your original picture.
when it isn't = -1 (mouse is over control) you can wire new picture. there
is also a 'button down' attribute, so when mouse is clicked you can call
other vi, etc. as well as display a third image if you want one for when
button is clicked. one suggestion, read images first to avoid delays.

pat


"X3aD" wrote:
>Is it possible to do a mouseover type function in Labview where when the>mouse
is over a button that a certain picture can be displayed. Thanks.>>Dewayne>>
0 Kudos
Message 3 of 8
(3,460 Views)
"patrick sincebaugh" wrote in message
news:39e075e1@newsgroups.ni.com...
> I use the picture control when I want a mouseover effect. The control has
> a mouse attribute that you can monitor in a while loop

I have done similar and was about to post it, but saw yours first..

In my experience this EATS through processor time. Any picture indicator
displays or probes tend to be very very slow in my experience. I'd love to
know how to speed these things up somehow. Not sure if I'm simply
experiencing slow communication with video drivers/hardware etc, but I tend
to have a couple hundred MS latency writing to the indicators and under a
hundred trying to read the attribute nodes.

-joey
0 Kudos
Message 6 of 8
(3,460 Views)
Hi Dewayne

There is a mouse library in the info-labview ftp site.

ftp://labview.pica.army.mil/pub/labview/vi/lv4/

the file name is:

mouse13.zip and mouse13.txt

Tim

X3aD wrote:

> Is it possible to do a mouseover type function in Labview where when the
> mouse is over a button that a certain picture can be displayed. Thanks.
>
> Dewayne
0 Kudos
Message 4 of 8
(3,460 Views)
Hi Dewayne

There is a mouse library in the info-labview ftp site.

ftp://labview.pica.army.mil/pub/labview/vi/lv4/

the file name is:

mouse13.zip and mouse13.txt

Tim

X3aD wrote:

> Is it possible to do a mouseover type function in Labview where when the
> mouse is over a button that a certain picture can be displayed. Thanks.
>
> Dewayne
0 Kudos
Message 5 of 8
(3,460 Views)
Hi Again

I have just read my reply to Dewayne and thought it a bit brief.

The files mouse13.zip contains an excellent vi called mouse magic. It is a small file that uses a DLL to return the mouse
position, relative to the screen, and which mouse button pressed.
To make the absolute mouse position relative to its position in the window you have to use vi server to find the window's origin
and bounds. To know if the mouse is over a control you have to check the mouse position to see if its relative position is over
the control area. The control area is is found using the controls origin and bounds attributes.

Hope this is more helpful

Tim

p.s. sorry about the repeated message.



Timothy John Streeter wrote:

> Hi Dewayne
>
> There is a mouse libr
ary in the info-labview ftp site.
>
> ftp://labview.pica.army.mil/pub/labview/vi/lv4/
>
> the file name is:
>
> mouse13.zip and mouse13.txt
>
> Tim
>
> X3aD wrote:
>
> > Is it possible to do a mouseover type function in Labview where when the
> > mouse is over a button that a certain picture can be displayed. Thanks.
> >
> > Dewayne
0 Kudos
Message 7 of 8
(3,460 Views)
[posted and mailed]

princeblack@hotmail.com (X3aD) wrote in
:

>Is it possible to do a mouseover type function in Labview where when the
>mouse is over a button that a certain picture can be displayed. Thanks.
>

Yes.

You can get the bounds of an object via an attribute node, and the mouse
coords from freely available vi's.

OR

Place a picture control behind the button and return the attribute node
property called MOUSE. It returns the coordinates of the mouse relative to
the control ((0,0) ... (x,y)) and (-1,-1) if outside the picture.

--

Alexander C. Le Dain, PhD
ICON Technologies Pty Ltd
http://www.icon-tech.com.au
0 Kudos
Message 8 of 8
(3,460 Views)