LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Limit the user to enter in Array

Hii Friends'

 

 

I am having 1 array control in front panel .In which the user will enter the values.... now actually in real time i will visible upto 20 elements in the array control ...But the user have to enter only 5 elements in the array ....how to restrict them......... 

0 Kudos
Message 1 of 8
(3,727 Views)
It's not clear what you are asking.  Perhaps you can post a screenshot of a front panel and mark it up as to what the 20 elements are and what you mean by the 5 elements.
0 Kudos
Message 2 of 8
(3,717 Views)
Hiii actually in that image actually first 5 element only contain data ..... but all the 20 elements r visible..... so they can edit other elements in the array.... we have to avoid that how to do .....
0 Kudos
Message 3 of 8
(3,709 Views)
OK, but why not to simply resize the array height? You really need to show the other 15 elements?
Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 4 of 8
(3,706 Views)
ok but i am using slide bar to move the index ...how to reduce that according to various size in the array.....
0 Kudos
Message 5 of 8
(3,701 Views)

Will the array ever containg more than 5 elements?  If so, would you want to have more than 5 elements to be shown?   If you could have 6 elements shown, would you want the user to still be restricted to only editing the first 5?

 

You can resize your array on the front panel so that only 5 elements are shown.  Then right click on the array, Visible Items, and remove the check mark from index display.  Now they are restricted to seeing 5 elements and have no means of indexing the array on the front panel to get to any others.

 

If your use case is more complicated than that, then you will need to explain it more so that a programmatic way can be devised to allow or disallow editing of other elements.

Message 6 of 8
(3,694 Views)
Hey not like that actually , for visible purpose i will kept 20 rows ..... see in  that control array iniially i will read from file and update the Virtual channel names wheather it is 4,5 or 10 will came according to that i will update.....For example if the channels contain up to 8 means then i have to restrict the user to enter the datas upto 8 only...... But at the same time all the 20 are in visible mode............
0 Kudos
Message 7 of 8
(3,654 Views)

I think it would be a very confusing user interface to show a user the unhighlighted rows that they would not be allowed to click in and edit.

 

I think you should just hide the index display, and just programmatically change the number of visible rows by way of the NumRows property node.

 

Anything else would be a hack such as placing a transparent object over the lower part of the array and programmatically changing the size and start location of the object based on the number of empty rows you want to show but not be able to access.

Message 8 of 8
(3,651 Views)