Jump to content

Interactive indicator


Recommended Posts

Is it possible to create an interactive indicator? Here is an indicator with booleans presenting if a file has arrived or not. If I click on the red light something should happen, like presenting a pop-up with indices (which I can translate to a certain file which is missing). Is this possible at all?

Sure - but you're after a control that can act like an indicator. You can write data to a control using it's local variable, and you can create a dynamic right-click menu as well. I hope that's given you enough info to go on - if not, let us know and I can throw an example together.

Link to comment

I'm not quite sure what you mean. Indeed I want an array of controls, and for each individual control set the appearance. I tried to wire a property node to the control but then I alter all the controls inside the array at once. If you can show me a short example of what you mean would be nice.

BTW I am wondering what are you doing all day? The number of your posts is quite impressive.

Link to comment

Of course there is, register each of the controls for mouse events.

Keep in mind that you should use the Register Events Node to wire an array of references for the event, then within the event structure it will retrun the reference to the individual ref from the array of ref that actually fired the event, look at the lable or any other defining information to determine which one fired the event.

post-208-1154615695.jpg?width=400

Dynamic methods like this and many more will be discussed at NI Week session E15

Session Title: The Art of Creating Dynamic, Flexible LabVIEW Applications

Session Speaker(s): Norman Kirchner, Gerald Albertini

Session Schedule: Thursday, August 10 @ 10:30 AM, Room: 11A/B

Link to comment
If you can show me a short example of what you mean would be nice.

This is what I was thinking of:

post-181-1154620349.png?width=400

Download File:post-181-1154619977.vi

BTW I am wondering what are you doing all day? The number of your posts is quite impressive.

I've got a LAVA RSS feed coming into my Outlook, so I get your post in my inbox not long after you submit it :) I like to answer questions quickly, when my mind is still fresh, although I do post a lot of crap too - that's prbably why my number is so high :D

Link to comment

Well using the Cluster will be much easier to figure out what element was clicked but if you must use an array, you should register the "array element" for the mouse up event and the math will be much cleaner when trying to calcluate which element was clicked because you never need to use the mouse click position, it will simply return the left/top position of the control clicked upon

See below

post-208-1154621312.jpg?width=400

Link to comment

The math would be cleaner if it would actually tell you what the indices of the element were :rolleyes:

There is still the need to calculate the index using the array position (as shown in crelf's post), and you need to be careful if you use small array elements like booleans. In this case if the caption, label, or indices are showing the calculated index will often (or always) be incorrect.

David Saunders

Link to comment

I just submitted this VI to the Code Repository, but will post it here considering that with NI Week it may not get reviewed for a while.

I designed it as a general tool to do the "Which array element did I click on?" task. It will work regardless of the visibility of the Caption, Label, Index Display, or Scrollbars. Version is 7.1.

EDIT: I forgot to mention that it will work on any N-dimensional array.

David Saunders

Download File:post-1519-1154636554.vi

Link to comment
I just submitted this VI to the Code Repository, but will post it here considering that with NI Week it may not get reviewed for a while.

It's been received and has been reviewed.

He won't be at niweek so he will get it approved.

Gee - rub it in whydon'tcha! :(

Link to comment
Gee - rub it in whydon'tcha! :(

You get some sympathy, but not much from this corner. I'm going to be stuck in Owego, NY for NIWeek and today we sort of had to go home early. The Hammer of Thor took out the power station here at my current client in mid afternoon. Awefully glad the storm only lasted a few minutes. It was pretty impressive to see the lights go out and stay out, then flash as the lightning hit the power station repeatedly. Had a lot of people scrambling to disconnect their laptops, PC's and test systems.

I still like the idea of Mid-Winter LAVA Conference to compensate those of us who can't make NIWeek this year.

Link to comment
Well using the Cluster will be much easier to figure out what element was clicked but if you must use an array, you should register the "array element" for the mouse up event and the math will be much cleaner when trying to calcluate which element was clicked because you never need to use the mouse click position, it will simply return the left/top position of the control clicked upon

See below

post-208-1154621312.jpg?width=400

Haven't been aware to use the array and dynamic event in such a combination, really nice :thumbup:

Link to comment
I'm going to be stuck in Owego, NY for NIWeek and today we sort of had to go home early.

I'm originally from Jamestown, NY and I still drive back and forth on Rt 17 a couple of times a year for the holidays. It could be worse; you could be driving there in January!

Sorry you won't be there. My flight arrangements have me getting into Austin at ~ 9:00 pm and it's a half hour drive to the LAVA B-B-Q (according to the map), so I'll probably miss it :(

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.