Jump to content

Clicking on a Numeric Array to Open another VI


Rohit

Recommended Posts

Hey all, I am a long time reader, first time poster (not really experienced). I was hoping someone can help me out with this problem.

Given an array of say ten elements, all being numeric for example, I want to be able to say click (or double click) on for example the 5th element and bring up another window with information solely for that element.

I tried playing with the Events Structure however I can only select the entire array to perform the event, not just a single element in the array.

Is there a way to I guess, track where the mouse clicked so that I can perform actions pertaining to the desired element? Or another 'proper' way of doing what I am looking to do?

Hope I made sense...

Thanks.

Rohit

Link to comment
Thanks a lot for the input guys. Both the listbox and the array will come in handy. One thing I like about the listbox is that it has a vertical scrollbar. Is there any way of inputting a scrollbar on an array?

It can be done, but you'll need to program it. You can use the IndexVals property of the array in combination with a numeric slider to set the visible part of the array.

As of october 3rd it will very probably be built into LabVIEW. :thumbup:

Link to comment
It can be done, but you'll need to program it. You can use the IndexVals property of the array in combination with a numeric slider to set the visible part of the array.

As of october 3rd it will very probably be built into LabVIEW. :thumbup:

Hey thats not a bad idea, thanks! Guess you got to be a little creative :thumbup:

Link to comment

haha well I guess if you want to get rid of a couple of extra wires edit the control. I have been having so much fun with listboxes, that I've filled them totally up, however just can't seem to figure out how to make sure I have a 'clean' listbox when I start my program.

Attached is a simple insert, if someone can tell me how on earth to clear it (because I can't seem to find any property nodes, and if I have a list of 500 items, does it make sense to delete all the rows each time i start up...)

Download File:post-3094-1127934686.vi

Link to comment

Alright last question on this topic which I seemed to have butchered. I am trying to incorporate a boolean control array along with the listbox where each control corresponds to the specific index in the listbox. Idealy I would like the array to scroll along with the scrolling of the listbox, so the controls line up so to speak. I didn't have any luck with finding events or properties that can be manipulated. The only other option I tried was using an array of clusters, where each cluster has some data (like a numeric or string) and the boolean control, in this case a checkbox. However what I found was that for one thing, I would have to play with the pixels of course to get the original question on clicking on an array to work, and another thing I found that I was unable to check off the boxes in the array, they simply acted as indicators.

Any suggestions? Attached is the listbox vi and the array of clusters vi.

edit: when continuously playing with the array of clusters option, i found that using the pixels as a tracker for the clicks, if i 'scroll' (ie updating the index), and complete a cycle for example in scrolling, if i click on the first element in the new appearing cycle, it gives me the first element of the entire array, so I guess for my application the listbox would be ideal if I can incorporate the boolean checkboxes along with each row.

Download File:post-3094-1128000843.vi

Download File:post-3094-1128000859.vi

Link to comment
Alright last question on this topic which I seemed to have butchered. I am trying to incorporate a boolean control array along with the listbox where each control corresponds to the specific index in the listbox. Idealy I would like the array to scroll along with the scrolling of the listbox, so the controls line up so to speak. I didn't have any luck with finding events or properties that can be manipulated.

Any suggestions? Attached is the listbox vi and the array of clusters vi.

Hi Rohit,

The listbox has a property whereby you can display a little symbol next to each entry. Instead of having a complicated series of moving boolean arrays, just display a "check" symbol for true and a "x" for false.

Right-click on an item in the listbox and visible items>symbols. You can also access this property through the property nodes.

And yes, you can add a scroll-bar to the array by right-clicking on the array>Advanced>Customize and then edit the array control to replace the up and down arrows with a scrollbar.

Neville.

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
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.