01-17-2012 02:50 PM - edited 01-17-2012 02:51 PM
How to populate an array of ring controls with strings[] ?
It must be karma. (Really bad karma, since I could not post this question in my intial try)
I must have been a r-e-a-l-l-y bad dude in a past life.... It's not like I'm bad in this one.. 😉
Okay... what am I trying to do this time? Something which I thought would be simple... Well... it's a long story.. I did have a simple solution, but the client wants something else. - sigh -
Here's what they want.. They want a control that allows for multiple selections from a ring control (or a control that allow a pull down selection). The stings are populated at run-time because it is based on 10,000 other things preceeding this particular selection. So it has to be dynamic.
The snippet & images below kinda show what I am trying to do...
The bottom image shows on the right the stings that get populated into the ring control. Since the number of elements / items changes, I did not want to have a bunch of controls stacked on top of another. Plus, I have to deal with an unknown quantity of selections.
Does anyone have a solution that can be recommended? If so, can you share the solution / idea?
Thanks,
RayR
Solved! Go to Solution.
01-17-2012 03:07 PM
Tell me more...
You are not trying to make the strings different for the ring sin the array (array elements can not have different properties) are you?
If so use a cluster.
If you can guess max possible you can set the cluster to auto-size verical and then hide extra rings in the cluster.
If don't know how many use a picture to show image of the rings and if user mouse down on picture move (off screen hidden) ring to the location of the click and set key focus to it. When they complete change (value change or mous leave events) then get image of ring put it in picture and put the ring away again.
Ben
01-17-2012 03:13 PM - edited 01-17-2012 03:22 PM
Thanks Ben,
The real estate on the GUI is already at maximum... Unfortunately pictures won't do..
Here is an additional tid-bit of info:
In the red circle, you would have some control which displays a bunch of ring (or similar) controls. Let's say it's a ring control.
The ring control would hold ALL the available choices, which are strings obtained from 2 different modems. The strings may not match and they want the freedom to select any valid combination, which means although the list may be the same, the selections may not be a match (for whatever reason).
On each line (row), they want a combination of selections, which is what I tried to display in the right side of the image. PLUS... Although there might be a list of 15 items on either side, the operator can choose to select only 3 choices. But has to select pairs on a given line (row).
That's why I thought of using something like a table or an array of ring controls. Maybe an array of enums could do the trick.. I should experiment with that.. It's not etched in stone what to use...
01-17-2012 03:15 PM
Ray- two words
Tree control
Set the selection mode for the brances to be single per branch populate a dynamic number of branches and the branches even get dynamic names based on the 10,000 other things. The look and feel will be nicer too IMO
01-17-2012 03:20 PM
I posted some code that does something similar here: http://forums.ni.com/t5/LabVIEW/array-of-cluster/m-p/1822451#M625032
It uses a table indicator, and individual controls that are moved on top of the table and populated as necessary. Would this approach work for you? You'd need a two-column table, and only one ring control, which you would populate appropriately each time the currently active cell changes.
01-17-2012 08:05 PM
Thanks guys,
Nathan,
I don't know if the example you posted in the other thread will be the solution, but it will be close. Thank you.
I will try it tomorrow morning and you will certainly have earned kudos & solution.
As a matter of fact, what you posted would solve something else.... Hence I will certainly try it first thing in the morning.
I love this forum!! This is great.
01-17-2012 08:24 PM - edited 01-17-2012 08:26 PM
@Ray.R wrote:
Thanks guys,
Nathan,
I don't know if the example you posted in the other thread will be the solution, but it will be close. Thank you.
I will try it tomorrow morning and you will certainly have earned kudos & solution.
As a matter of fact, what you posted would solve something else.... Hence I will certainly try it first thing in the morning.
I love this forum!! This is great.
I had a chance to look at Nathand's solution the other day- I'll be using something like it too in the future. It is pretty slick
Now, Get back in your cave--- you got work to do!
01-18-2012 07:35 AM
How did yu know I was in a cave??
Must have been the echo...
😛
01-18-2012 08:42 AM
Nathan,
How did you "fit" the ring control inside the table?
01-18-2012 09:07 AM
Wait... I think I figured it out... Nicely done. 🙂