LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Large symbols for Multicolumn Listbox

Solved!
Go to solution

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?

 

Chris

0 Kudos
Message 1 of 14
(9,487 Views)

The online documentation for setting custom Item Symbols indicates that the 16x16 is the maximum size.

 

Parameters

 

 

NameDescription
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.

http://zone.ni.com/reference/en-XX/help/371361D-01/lvprop/treectrl_setcustglypharray/


Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

0 Kudos
Message 2 of 14
(9,464 Views)

Smiley Surprised Note: My link above refers to the tree control, but the tree and MCL have the same parameters and limitations


Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

0 Kudos
Message 3 of 14
(9,456 Views)

Damn, thanks for that Phil, perhaps I should have looked at the Help first sorry

 

Chris.

0 Kudos
Message 4 of 14
(9,439 Views)

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......Smiley Sad

 

Chris

0 Kudos
Message 5 of 14
(9,408 Views)

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:

http://www.famfamfam.com/lab/icons/silk/

 

 

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.

 

 

-Barrett
CLD
0 Kudos
Message 6 of 14
(9,391 Views)

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.

0 Kudos
Message 7 of 14
(9,381 Views)

The most flexible way is to use a picture control, lot of work but quite fun if you have some spare time 🙂

 

0 Kudos
Message 8 of 14
(9,369 Views)

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 Smiley Wink

 

Thanks for all your ideas

 

Chris.

0 Kudos
Message 9 of 14
(9,357 Views)
Solution
Accepted by ChrisReed

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.

-Barrett
CLD
Message 10 of 14
(9,355 Views)