LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Listbox "Top Row" limited to 32k

I built a primitive little scripting language in LabVIEW that makes calls into a state machine.  The listing for the langage is shown in a Listbox control.  As the execution occurs, the listing highlights the current line of execution, and keeps the listing in the window using the "Top Row" property.  All was good.

 

Then, a very clever user built a script generator.  Scripts can now be exceedingly long, and (despite taking an I32), the Top Row property starts erroring at a value of 32k.

 

Are there any purely UI workarounds to keep my listbox scrolling?  (I'd rather not have to tinker with my scripting language any more...)

 

Thanks,

 

Joe Z.

 

 

0 Kudos
Message 1 of 7
(3,303 Views)
Try to replace it with a multicolumn listbox. You'll probably have to change some of your code, but the Top Left Visible Cell property takes a U32 and doesn't return an error when you give it a number higher than I16.

___________________
Try to take over the world!
0 Kudos
Message 2 of 7
(3,286 Views)

I also tripped over this "limitation". Any chance this gets resolved? The data type of this property is I32 so why limiting to I16? And a note in the documentation also can´t be find.

0 Kudos
Message 3 of 7
(3,092 Views)

@Felmer wrote:

Any chance this gets resolved?


Probably not, at least as long as NI isn't really aware of it and consider it a bug. I would suggest you go over to the monthly bugs thread in the breakpoint board and add a link to this thread with a brief explanation of the problem. This should get NI to look at it.

 

Personally, I would agree it is a bug, but a relatively minor one, and I'm not sure increasing the number of rows is a good idea. It's possible that updating the documentation to reflect this limit is the best solution.

 


___________________
Try to take over the world!
0 Kudos
Message 4 of 7
(3,079 Views)

So, I have a similar problem. I have an error when I try to set a value greater than I16 to the listbox "top row" property. I use LabView 2012, version 12.0f3 (32bit).

0 Kudos
Message 5 of 7
(2,946 Views)

Then do what I suggested above and use a multicolumn listbox instead.

 

Another alternative is to hide the scrollbar and create a separate scrollbar control. That way, instead of putting 50k elements in the listbox, you just use the value of the scrollbar to get a subset of the array data and put it into the few elements of the listbox which are actually visible. A bit cumbersome and it wouldn't be necessary if this issue didn't exist, but I would say that a listbox with that many elements shouldn't really exist in the first place.


___________________
Try to take over the world!
Message 6 of 7
(2,927 Views)

Here is an example of how to use a virtual multicolumn listbox.  The same idea can be applied to a normal listbox, but it is basically what tst suggested.  A display of data, that changes as a vertical scrollbar changes to give the appearance of one large table.

 

http://lavag.org/topic/15289-virtual-multicolumn-listbox/

0 Kudos
Message 7 of 7
(2,914 Views)