LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to populate an array of ring controls with strings[] ?

Solved!
Go to solution

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

 

 

 

 

 

 

 

Download All
0 Kudos
Message 1 of 13
(11,248 Views)

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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 13
(11,242 Views)

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

0 Kudos
Message 3 of 13
(11,239 Views)

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


"Should be" isn't "Is" -Jay
Message 4 of 13
(11,238 Views)
Solution
Accepted by topic author Ray.R

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.

Message 5 of 13
(11,234 Views)

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. 

 

Smiley Very Happy

0 Kudos
Message 6 of 13
(11,217 Views)

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

 

Smiley Very Happy


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

 

Now, Get back in your cave--- you got work to do!


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 13
(11,213 Views)

How did yu know I was in a cave??

 

Must have been the echo...

 

😛

 

0 Kudos
Message 8 of 13
(11,181 Views)

Nathan,

 

How did you "fit" the ring control inside the table?

0 Kudos
Message 9 of 13
(11,170 Views)

Wait...  I think I figured it out... Nicely done.  🙂

0 Kudos
Message 10 of 13
(11,162 Views)