Hello, This new topic/issue is based on the previous two problems. that I listed In the URL. I have attached 2 steps pictures here of parts of my project. I have created directory path, in a way that you just select the folder and it will show all the files in that folder in list format. You can also see that I have check boxes there. My problem is even though I have check boxes I don't know how to check them off when it's running and also is there any way I can Highlight the files in the list and double-click to activate/operate them? I am using Labview only for 4 days. Any type of help will be much appreciated.
Solved! Go to Solution.
My problem is even though I have check boxes I don't know how to check them off when it's running
You already know how to set them to show an image - so I guess you also know how to choose a different image for those checkmarks!?
Depending on your program state "when it's running" you need to set the checkmarks to whatever you want them to look like!
and also is there any way I can Highlight the files in the list and double-click to activate/operate them?
- To detect user interaction you should use the event structure. There's an event for mouseclicks on controls and you can even determine single or double mouseclicks!
- When you want to highlight items you may try to play with property nodes of your listbox. Usually tables allow for more options regarding cell formatting…
Yeah, I still don't know what to do, how to do. If you can tell me step by step that would be great. Plus I tried to change the image of the check box but it doesn't help. This website might give some clue on what to do but I'm still not sure.
Those are not real checkboxes, but rather pictures of checkboxes. When you click on a row in the listbox, you need to have an event that will get the value that was clicked and update that index with the appropriate picture of the checkbox that you want to show.
Add another event for the double click action on a row of data. I know you didn't mention anything about the column headers but if you double clicked a header (maybe for sorting, etc), that event can be captured here as well.
Edit: The clicked column header would more appropriately go in a Single Click event but you get the idea, I hope.
Thank you very much. sorry for my lack of knowledge but How do you make this box? And how do you get 'ctlref' and 'NewVal' in event structure?
That "box" is the In-Place Element structure on the structures palette. Right click the border of it and select Add Array Index/Replace Element.
The CtrlRef and NewVal is part of the Value Change event. It's called the Event Data Node but it's not something that is found on a palette somewhere. After creating the event for the Listbox, it should appear on the left hand side of the event structure. You may need to click and drag the edges of the node to expose all available data values in the node. If you don't need all of the values, they can be hidden away, much like a cluster Unbundle.
FYI, the pictures that I attached in my replies are snippets. Learn how to use them because they are invaluable for sharing code on the forums. Click and drag the snippets I posted to your PC desktop and then drag them into a Labview block diagram. The code is actually embedded into the file and will be dropped onto your VI.
This is So Awsome! I am ever grateful to you!! It's working great. Just one question: I think you cannot continuously click on a row to check on and off. Once you check on a row you have to check on another row and then you have to return back to the previous row to check it off.
That's because the event is setup as a value change event. Clicking a row that is already selected doesn't trigger a value change event. If you change the event to a Mouse Down event, then you can use a Point to Row Column property node to get the row that was clicked (whether the value changed or not).