06-15-2011 02:57 PM
Hello everyone I want to create a grid in labview in which If I click in any block it should change colour and say it changes from intially white to red, than blue. And I want to save the data representing the colour like 0, 1, 2 , 3 to an array. Can anybody help me, where should I start with?? Can you please direct me towards any example.
Solved! Go to Solution.
06-15-2011 03:26 PM
Use an array of picture rings.
06-15-2011 03:41 PM
Like this
06-16-2011 01:19 PM
Thank you guys for your reply (Tim & altenbach ), I would like ask one question. How did you create Red and blue coloured color box without using any additional vi. Because whenever I try to create it I end up creating something else. I know this is silly and If I want to have it in different shapes than I shoud simply use make rectangle and other vi right ??
06-16-2011 01:41 PM - edited 06-16-2011 01:42 PM
right-click the picture ring array terminal and select "create constant" You get a diagram constant of the array of picture rings. Now drag the element out of the array container to the diagram and you got yourself a diagram constant of the picture ring. Make as many copies you like using ctrl-drag.
06-16-2011 02:22 PM
Ah sorry, the posted VI has an array of pictures instead on an array of picture rings as I suggested. Thus my reply does not apply directly.
I recommend a array of picture ring indicators, since there is only a small set of possibilities.
You coulds use code similar to the one shown in the link of this post:
A full featured 4x4 Tic Tac Toe Game
Alternatively, you could make the entire grid as one big picture.
06-16-2011 04:59 PM
If it were me, I would get the color and numeric value in one place by using an intensity graph.
Easy to change the grid size, number of colors you want as well as the colors themselves.