LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

picture control array

I do not know if labview is capable of doing this... but,

I want an array of clusters, containing a picture control and a text box (containing the pictures name). I want to be able to re-arrange these clusters/picts by dragging and dropping OR by clicking on one cluster, and then clicking on another, placing the first cluster after the secondly clicked cluster.

From what experiments I've done, I can't seem to find any way to get the index number of an array element that has been clicked on - or the index of the element that received the mouse up event in an event structure.

Does anyone have any tips or hints that might get me jumpstarted? Thanks in advance,

Mark
0 Kudos
Message 1 of 2
(2,803 Views)
Use a property node, and read the values to calculate :
Floor(ArrElemn.Position Top - Top(of array))/ArrElem.Height + IndexVals).
As always, it's much easy to read a LV diagram :D, so look at the attached vi.
The ArrElem.Position property returns a cluster containing the left and top position (relative to the vi window)of the array element that was clicked in. From there it's not very complicated to calculate the index val of the element.
There are probably other solutions.
Beware with the label or caption. Either hide them, or take their positions into account (not a trivial problem...)

CC
Chilly Charly    (aka CC)
Message 2 of 2
(2,786 Views)