02-15-2011 09:26 AM
Hi all,
Before I go to the effort of creating an XControl, which will no doubt take many hours to perfect, or delving into the cagey world of .NET calls again, I thought I'd ask the question just in case this is natively possible in LabVIEW:
Can you embed items, such as progress bars, into the cells of multicolumn listboxes, tables and trees?
I'm guessing not, because the built-in datatype is string, and other than symbols there's no apparent support for other datatypes.
As an illustration, this mockup shows what I need to present:
Has anyone achieved this? Is there a simple way, other than having a number of floating, programmatically positioned progress bar controls on the screen? (Don't even go there)
Thank you for reading this, and thanks in advance for your help!
02-15-2011 09:46 AM
@Thoric wrote:
Is there a simple way, other than having a number of floating, programmatically positioned progress bar controls on the screen?
Use a string to represents the progress bar. You use a single char (O, -, =, |, etc.) and keep adding more as time progresses. I have no idea how clear this would be.
02-15-2011 09:58 AM
Thank you for the suggestion, tst, I do have a habit of missing the obvious sometimes, and I think this might just work for me. Indeed, using ASCII table characters and a fixed-width font I can create the impression of a progress bar, but it does lack two elements I'm trying to maintain: aesthetics, and the superimposed text. It's not like the Window's style my client will be expecting, and I have ideas about the superimposed text which make it quite useful so I'd like to keep it.
Not to give up hope though: Is there perhaps a more graphically appealing option someone might be aware of?
02-15-2011 11:25 AM
One more option, based on your example here - don't use a tree. Just use a 1D array of clusters with the label and the scrollbar. This assumes, of course, that you have a linear list and won't allow you to collapse sections, but that might be OK for you.
02-15-2011 11:33 AM
Hi Thoric,
I don't think so but your question got me thinking... how about a different font... bar code font.
Don't waste time on that idea.
Ben
02-15-2011 01:06 PM
You can get the coordinates and dimensions for a specific cell in the tree control, then move a progress bar to that location and set the size to match. This is a lot easier if you don't have a scrollbar (you don't have to worry about moving it) but with some work you should be able to achieve the interface you want.
02-15-2011 01:18 PM
Hi tst and Ben,
Unfortunately I do need the tree for its collapsible capabilities (child items etc.)
I'll look into the barcode font idea, or perhaps some other font that has large blocks.
In the meantime I've been toying with capturing snapshots of a customised progress bar control in a subvi and placing the pictures strategically about the tree control. It just might work...
02-15-2011 01:31 PM
02-15-2011 02:37 PM
@Thoric wrote:
...but it does lack two elements I'm trying to maintain: aesthetics, and the superimposed text. It's not like the Window's style my client will be expecting, and I have ideas about the superimposed text which make it quite useful so I'd like to keep it.
Two solutions (?) - change the cell BG color to change its appearance (at least somewhat) and have the text as part of the text of the progress bar. You would probably also want to make the text bold.
02-15-2011 04:14 PM
@tst wrote:
Two solutions (?) - change the cell BG color to change its appearance (at least somewhat) and have the text as part of the text of the progress bar. You would probably also want to make the text bold.
That is true, and I'll use those ideas if I have to revert to ASCII-character progress bar mock-ups, thanks.