LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

popup description for listbox items

Solved!
Go to solution
I want to show some information, in a popup box, as the mouse move over each item of a listbox. How may it be done?
0 Kudos
Message 1 of 9
(3,810 Views)
Message Edited by Phillip Brooks on 10-14-2008 07:06 AM

Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

0 Kudos
Message 2 of 9
(3,803 Views)
Thanks Phillip B…! Help is what is required here.
0 Kudos
Message 3 of 9
(3,795 Views)

If the listbox's no. of items are finite & less (say 20), you can store the messages in a string array constant & index it as per the row no. when the mouse is hovered (moved) over the listbox.

 

I think this should work. Please post back your findings here...

- Partha ( CLD until Oct 2024 🙂 )
0 Kudos
Message 4 of 9
(3,793 Views)

Q1- How do I find out which item the mouse curse is over?

Q2- How do I show the strings in a popup box that changes text dynamically (i.e. requires no input from user)?

0 Kudos
Message 5 of 9
(3,790 Views)
Solution
Accepted by topic author Rashid-Malik

Hi,

 

You can try this,

 

Get the following properties from te listbox

 - ContentRectPos

 - ContentRectBounds

 - CelHeight

 

Create a eventloop with listbox: mouseMove

Get position from the mouse by using coords available inside eventloop 

 

With this information you determine on which item the mouse is over.

and do what ever you want.

 

Regards

  Fred

Message 6 of 9
(3,771 Views)
Thanks a lot fgrootent! That solved one part of the problem (i.e. how to find out which list item the mouse cursor is over). Now this leaves the second problem. After I have found out which list box item is under the cursor, how do I display text in a tooltip?
0 Kudos
Message 7 of 9
(3,764 Views)

As the String I would use the 'tip strip'.

Have a look at the VI package manager (which has a brilliant GUI): They use the tip strip (I guess) to display the full text of an itemin the mult-column-listbox when it's not fully displayed. There was a thread on this forum where one of the main developers shared a lot of tricks. (Can't find it right now).

 

Felix

Message 8 of 9
(3,763 Views)
Thanks F. Schube…! The tip strip property solved the second query.
0 Kudos
Message 9 of 9
(3,758 Views)