LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

array element reference alternative

Hello. Smiley Happy

 

I need to make gui that will look like that:

 

Untitled.png

 

Each record will have some images , text, boolean  and numeric. Also row blinking is desired.

 

 

My first idea was tree since I can move records and have some parents, but I cant add here images and booleans because text is my limitation.

 

Another idea was to use MCL but again the same problem. I can use custom icons but 16x16 px is max that I can do. And they can be placed only in forst row... I still cannot add images. I have seen workarounds where people put transparent array on top of MCL but that sometimes works in strnge ways.

 

Last idea is to use array of clusters. Reading, and updating record by name is doable so thats good.  But I can't make reference to boolean in array and make it blinking.  My Idea now is to make boolean xcontroll that will blink when value is set to true and will be transparent when its off... 

 

Have you any suggestions? Making good GUI always brings me major headaches and I am running out of ideas.

 

0 Kudos
Message 1 of 13
(3,742 Views)

Apa,

 

I would lean towards using a cluster but can you explain why you will end up with an array of booleans?


I see a picture of the facebook messaging system, can you make a quick mock-up in LabVIEW so we can understand what the controls are mapping to?  You mention a numeric which I do not see in your sample image.

 

Also can you explain row blinking?

Matt J | National Instruments | CLA
0 Kudos
Message 2 of 13
(3,727 Views)

Is the number of array elements fixed?

 

How is it supposed to be "blinking"? The entire cluster or just one of the items (picture, name, check, etc).? You can always simulate blinking by alternating between two states.

 

The most flexible solution would simply use a large picture indicator where you draw and write all elements programmatically. You can intereact with it via the mouse-down coordinates.

0 Kudos
Message 3 of 13
(3,723 Views)

Number of elements in array will change.

 

Each record is a cluster that contains :

status (4 diffrent images that need to be changed)

data - string

request  (3 diffrent images that need to be changed)

and some other numerics and strings that are used to display

I want to make whole cluster inside array blinking.

 

0 Kudos
Message 4 of 13
(3,715 Views)

This example demonstrates how to get the reference to an element of a cluster within an array... this would answer your objection to using an array of clusters:
http://www.ni.com/example/30904/en/

0 Kudos
Message 5 of 13
(3,711 Views)

@Logan_K wrote:

This example demonstrates how to get the reference to an element of a cluster within an array... this would answer your objection to using an array of clusters:


The properties apply to the cluster element of all array elements. You cannot blink a certain array element using property nodes.

0 Kudos
Message 6 of 13
(3,690 Views)

On a somewhat related note trying to make an array of clusters blink produces some strange behavior (in 2014 at least).  May be one to add to the bug list as I cannot imagine it is intended and I cannot seem to find any reports of this.  I did find other bugs related to blinking arrays which were equally as funny/strange though.

Matt J | National Instruments | CLA
0 Kudos
Message 7 of 13
(3,678 Views)

@altenbach wrote:

@Logan_K wrote:

This example demonstrates how to get the reference to an element of a cluster within an array... this would answer your objection to using an array of clusters:


The properties apply to the cluster element of all array elements. You cannot blink a certain array element using property nodes.


Darn... you're right. I remember now that the only way I could get a reference to a specific array element was by right-clicking on the array element directly from the front panel and select "Create->Reference". This isn't a very dynamic or scalable solution, but if you start with a fixed-size array with your maximum number of possible elements, you could, in theory, generate a static list of references for each of the elements. Then, just manipulate the number of rows displayed by the array. So if the max size of the array is small, then this might work. With that said, the blinking property seems to have some flaky behavior when you get the reference in this way, because what I just mentioned worked earlier today, but now I can't get it to work....

0 Kudos
Message 8 of 13
(3,662 Views)

Perhaps this little and not too far thought-out example gives you an idea how to let single Array Elements blink. Kind of crude, but it works.

  1. create a FlatBox Decoration
  2. make it the size of your cluster of which the array consists
  3. keep it invisible until you know which element you want to have blinking
  4. turn it visible and change the color from transparent to your color of choice every x milliseconds
  5. keep track of when to "unblink" the FlatBox (and turn it invisible again)
0 Kudos
Message 9 of 13
(3,640 Views)

what about array of boolean xcontrolls? 

This xcontroll will be programmed in way that it starts blinking when is set to true.

And since I can set value of one element in array will that make it? 

I am not directly using property nodes to make it blinking... 😄

 

Thanks for sugestion comrade. It makes it but when I add scrollbar it.s over..

0 Kudos
Message 10 of 13
(3,599 Views)