07-11-2013 02:13 PM
Is there an inherent limit to the length (number of lines) of a listbox in LabVIEW 2010?
Thanks.
Solved! Go to Solution.
07-11-2013 02:41 PM
Probably limited to 2^32 entries.
But I bet the UI becomes unmanageable long before that. I experimented with putting 1 million entries in. It worked, but my mouse clicks seemed to get slow.
07-11-2013 02:43 PM
Ok, thanks.
07-11-2013 03:01 PM
I came to the 2^32 number because the underlying item list data in a listbox is a string array. Array functions are geared towards using a U32 or I32 number to be able to index out the elements.
Actually, I'd argue the limit is 2^31 because the datatype of the list box is an I32. So any number greater than 2^31 would exceed the limits for the listbox datatype.
07-11-2013 03:19 PM - edited 07-11-2013 03:20 PM
2^31-1 Bit 31 is the sign bit
07-11-2013 04:08 PM
2^31
Index value is 0 to 2^31-1. A total of 2^31 items since counting starts at zero. And yes, the 32nd bit (#31 if you count the LSb as being bit #0) is the sign bit.
07-11-2013 07:24 PM
@RavensFan wrote:
2^31
Index value is 0 to 2^31-1. A total of 2^31 items since counting starts at zero.
And yes, the 32nd bit (#31 if you count the LSb as being bit #0) is the sign bit.
D'Oh