I can easily add 16x16 pixel symbols to a Multicolumn Listbox, but anything larger seems to be shrunk down to fit within these limits. Is there anyway I can 32x32 pixel symbols to a Multicolumn Listbox and have them remain at this size?
Solved! Go to Solution.
The online documentation for setting custom Item Symbols indicates that the 16x16 is the maximum size.
|Symbols||An array of clusters that describe the images you want to use for the item symbols. Images that are less than or equal to 16 × 16 pixels appear as their actual size. If you use an image that is larger than 16 × 16 pixels, LabVIEW shrinks the image to 16 × 16 pixels before displaying it as a tree control item symbol.|
Note: My link above refers to the tree control, but the tree and MCL have the same parameters and limitations
I couldn't quite give up on this idea and I was wondering if anyone had a good idea of how I can achieve what's displayed in the attachment.
This is basically a multicolumn list box with standard 16x16 pixel symbols (which are of course too small) with 32x32 pixel Picture Rings in the first four rows overlaid on top of the small symbols - so far so good.
But to be able to manage such a configuration I think would be a nightmare. The idea is I want to treat the Picture Rings as if they were the embedded symbols in the Listbox itself. ie. if you scrolled down the listbox the Picture Rings would also scroll down. Then you've got the problem of trying to align the Picture Rings with the Listbox rows and so on......
I've seen similar done where someone wanted for example an MCL table with editable text fields but one column was to have data entered by a ring.
It's not terribly hard to figure out the position of a cell or row and manipulate another FP element into place to match, but you are correct that you'd be looking at a lot of extra programming if it can scroll or resize and so on, catching all the appropriate events and then testing to make sure it all works. One approach might be to overlay an array (or cluster) of the pict rings, which ought to make the programming a little easier. Another issue is that list controls with symbols let you click on the symbol to select, and if your pict rings have to be on top (it would in system controls) you'd either have to give that up or add more event handling in catching clicks on the symbols and turning them into clicks on the items.
not a nightmare, but definitely consider if it's worth the time.
I like the "silk" icon set the best for 16x16:
edit: come to think of it, if you can get it to line up right, an array or cluster of the 32x32s should actually be pretty easy. Write a subvi that loops through the visible list items and gets the built in symbol for that line and sets the item in the matching cell of the pict ring. Uncheck "smooth scrolling" so you don't have to deal with partial icons, and run that subvi every time you update the control's symbols or the user scrolls the list.
The most versatile method involves creating an array of clusters. To achieve your task, the cluster would have a picture ring (the left-hand glyph), two text boxes, and a color box control (or picture ring) for the background color. Keep in mind each cluster element may have different values, but must have the same properties, so making some text small and some text large could not be easily achieved with my method (and generally speaking, cannot be achieved easily in LabVIEW). Perhaps you could make the prominent text prominent in a different way, such as a different background color or larger glyph.
I think I'll try the putting the Picture Rings in an transparent array and place that on top of the MCL. I might not have to scroll or scale the MCL after all, so that should make life a lot easier.
I've never actually used the Picture Control for anything as yet, so I don't think I'll start now
Thanks for all your ideas
array of pict rings on top of an MCL, with events to scroll it (although the code here is pretty quick and dirty.)
there's also some mixed-size fonts in there (you can do that with tables and MCLs) and the mcl behaviors are preserved. I couldn't come up with a very quick way to replace clicks on the icons (in the mcl) with clicks on the listbox items, but it can be done.