03-20-2009 08:10 AM
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.........
03-20-2009 08:47 AM
03-20-2009 08:51 AM
03-20-2009 08:54 AM
03-20-2009 08:57 AM
03-20-2009 09:00 AM
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.
03-20-2009 11:05 PM
03-20-2009 11:31 PM
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.