LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to click the check boxes and double click the files in the list?

Solved!
Go to solution
Highlighted

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. Screen Shot 2017-06-15 at 9.11.02 AM.png

Screen Shot 2017-06-15 at 9.11.36 AM.png

 

http://forums.ni.com/t5/LabVIEW/How-to-build-a-checkbox-list/m-p/3644959#M1023488

http://forums.ni.com/t5/LabVIEW/How-to-set-up-directory-path-and-open-files-in-a-software-built/m-p/...

0 Kudos
Message 1 of 13
(2,245 Views)
Highlighted

Oh well, Here's the file Itself.

0 Kudos
Message 2 of 13
(2,237 Views)
Highlighted

Hi Huqs,

 

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…

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2019 sometimes) on Win10+cRIO
0 Kudos
Message 3 of 13
(2,232 Views)
Highlighted

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.  Screen Shot 2017-06-15 at 10.45.35 AM.png

 

http://www.labviewing.com/check-box-in-multicolumn-listbox/

0 Kudos
Message 4 of 13
(2,211 Views)
Highlighted

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. 

Example_VI_BD.png


aputman
LabVIEW 2017
LabVIEW Programming
Message 5 of 13
(2,194 Views)
Highlighted

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. 

 

Example_VI_BD.png


aputman
LabVIEW 2017
LabVIEW Programming
Message 6 of 13
(2,183 Views)
Highlighted

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? Screen Shot 2017-06-15 at 2.14.39 PM.png

0 Kudos
Message 7 of 13
(2,172 Views)
Highlighted
Solution
Accepted by Huqs

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.  


aputman
LabVIEW 2017
LabVIEW Programming
Message 8 of 13
(2,164 Views)
Highlighted

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. 

0 Kudos
Message 9 of 13
(2,156 Views)
Highlighted

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

Example_VI_BD.png


aputman
LabVIEW 2017
LabVIEW Programming
0 Kudos
Message 10 of 13
(2,153 Views)