From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

creating panel

Solved!
Go to solution

Hi I need to create a panel and code it, here i have (checkable/uncheckable) boxes, there will be total 170 boxes if i select any one box out of 170 boxes class should be on(checked/ticked). if i have not selected any boxes out of 170 boxes class should be unchecked. 

 

sorry for my poor English, 

 

please give me ideas or examples to do it.

i have attached the dummy panel snap

0 Kudos
Message 1 of 5
(2,273 Views)

Anyone??

0 Kudos
Message 2 of 5
(2,250 Views)
Solution
Accepted by vinaypooja

For such a large number of controls you may want to consider using a control array, you can read more about this feature here

Message 3 of 5
(2,219 Views)

Thanks Wolfgang, I solved it using list box option. Thank you for advise.

0 Kudos
Message 4 of 5
(2,216 Views)
Solution
Accepted by vinaypooja

For such a large number of controls I would suggest creating them programmatically: create a panel with a single checkbox and iterate rows*column with DuplicateCtrl. CVI is good at this and that command simplifies a lot the task of creating large numebr of identical controls.

A single callback on all checkboxes could manipulate a static variable adding or subtracting 1 at every commit event. Such counter could then be used to mark appropriate checkbox 'non marked' / 'some marked'



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 5 of 5
(2,181 Views)