Color box in a 2D Array

Hi,
I am a beginner in Labview , i want to color a box in a 2D Array of color boxes.  So if the user clicks on a box inside the 2D array, the box will turn into a specific color. I think i need to get the column and  row of the element that has been clicked.
Then i want to check if the box already has been turned into another color , if not i want to turn it into a specific color ( e.g. connect 4).If it already has been turned into a specific color it wont change.
[img]http://i42.tinypic.com/dm9v9h.jpg[/img]
thats the color box.
So can someone please help me with this problem.
Thx

Here is a quick example (not at all bullet-proof, just trying to give you an idea).
All of the squares start white.
If a white square is clicked, it will turn red.
If it is already red, it will stay red.
Hope that helps getting you started.
Edit: I forgot one quick thing. Wire a constant of 100 to the event timeout (the hourglass in the upper left corner).
Message Edited by Cory K on 04-02-2010 11:44 AM
Cory K
Attachments:
Colors.vi ‏11 KB

Similar Messages

  • How to get the index of framed color box control in 2 D framed color box array

    Hi,
    In project, I want to show the different status (Std By, TIP, Pass & Fail) with different color for 200 color boxes arranged in 20X10 (2 D array). When user click on any of the array item, I want to show the details, so I want the index of the item. How can I get it?
    Thanks,
    Shrinivas
    Solved!
    Go to Solution.

    Why an array? There's more than one way to skin a cat 
    See attached
    "In theory, theory and practice are the same. In practice, they’re not."
    Attachments:
    CatSkinned.vi ‏19 KB

  • How can I make a color box indicator transparent?

    All, I would like to make a color box, which is part of a cluster in an array, transparent programmatically.  Instead of appearing transparent, it shows up with a LARGE "T" inside the color box, with a white background.  Because it is part of a cluster within an array, it will not work to use a property node... and because I would like to programmatically change the color, having it permanenty transparent (as proposed on another discussion topic) will also not work.  Can someone please help me turn a color box transparent programmatically?
    Thanks.
    Anthony

    The problem is that arrays of clusters cannot be passed into property nodes as falkpl has previously said. The attached jpeg shows how you would programmatically break the arrays into cluster, into elements, and then manipulate that color box to a transparent one. The T within the white color box indicates transparent though. If you were to attached that to a color attribute then you would see that object disappear (well I guess not since it's transparent )
    Grant H.
    National Instruments
    LabVIEW Product Marketing Manager
    Attachments:
    color box.JPG ‏21 KB

  • How to see color box in a cluster

    hello,
    i need an array of cluster elements that includes my table "color "and my table"color table" .
    I would like to see the real color but not 8271157.
    i give you my example in attach
    thank you for your help
    Solved!
    Go to Solution.
    Attachments:
    Sans titre 3.vi ‏10 KB

    Replace the U32 data type in the cluster with a color box, see the vi attached
    CLA, CLED, CTD,CPI, LabVIEW Champion
    Platinum Alliance Partner
    Senior Engineer
    Using LV 2013, 2012
    Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
    Attachments:
    Sans titre 3 MOD.vi ‏10 KB

  • Color Boxes

    Is there any way to limit the color options of a color box?
    If this is possible, how can I for example limit the color
    selection to eight different colors selected by me?
    * Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping. Smart is Beautiful

    Hi Gorka
    Another way is to use the color ramp control which can be used to return a number to represent the color selected..
    To do this:
    1 - On the pull down menu turn off intrapolation.
    2 - Change the numerical representation to U8.
    3 - Set maximum value of the control to the maximum numbers of colors you want.
    4 - Create an attribute node and change it to 'Color Array'.
    5 - The Color Array attribute requires an array of clusters. The cluster contains a DBL, which is the numeric you want colored, and an integer, which is the
    color you want for the numeric. You can make this array contain all the values you want to have seperate colors. To represent the color you want you can use
    the color constant.
    Tim
    Gorka Larrea wrote:
    > Is there any way t
    o limit the color options of a color box?
    > If this is possible, how can I for example limit the color
    > selection to eight different colors selected by me?
    >
    > * Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping. Smart is Beautiful

  • Round Color Box (Silver): Slows VI Server Access

    Continued from here:
    Christina (et al),
    I've attached two examples demonstrating the obervation.  I first ran into this because I use a simple flags framework in some of my applications.  If the flag name input is unwired, I auto-name the flag based on the calling VI name.  So, I get a reference to the calling VI and determine a flag name respectively as you can see in the attachment.
    The "Wait for Flag" primitive can be called in a loop as quickly as you like (limited by how long it takes to access the calling VI reference of course).  So, I had an application where the consumer loop had to run in the 100+ Hz range and because the Round Color Box (Silver) was on the panel, I couldn't get this kind of performance.  Switching to the Round Color Box (Modern) solved the issue (but doesn't look nearly as nice).
    The "test color boxes_Rapidly Access VI Refnum" example below is a simplified version illustrating the problem.  The "test color boxes_Wait for Flag" example better represents what I'm actually doing.  Just unzip and run the "test color boxes_Rapidly Access VI Refnum" VI and follow the instructions on the panel.
    Then, unzip and run the "test color boxes_Wait for Flag" VI for an actual use case.
    Thanks for taking a look.  Do you see what I'm seeing?
    Certified LabVIEW Architect
    Wait for Flag / Set Flag
    Separate Views from Implementation for Strict Type Defs
    Attachments:
    test color boxes_Rapidly Access VI Refnum.zip ‏26 KB
    test color boxes_Wait for Flag.zip ‏93 KB

    The problem here is that the "Silver" style frame draws relatively slowly. In most cases, this isn't noticeable because LabVIEW doesn't need to redraw the frame when the value of a control or indicator changes. But, when the control is an element of an array, LabVIEW does redraw the entire control for each element value change.
    So, for the time being, I'm afraid it's not advisable to use Silver controls (other than the "frameless" ones) as array elements.
    You can see that it's the frames that are causing the slowdown by coloring them transparent so that they're invisible. 
    I'm embarrassed to mention this, but the coloring trick also shows that there's a workaround where you take a picture of the array of Silver color boxes, put it in the background, and then color the frames of the actual color boxes transparent. I'm not saying it to recommend it, just to say that it does get you something that looks the same without the performance problem.
    Christina Rogers, Senior Software Engineer and UX Technical Lead, LabVIEW R&D

  • Lightroom 5 What is the Color box for in the adjustment brush and filters

    Hi
    I am running Lightroom 5.6 although I think this has been around probably from 4.In the Basic Development module when I select the Adjustment brush, Radial filter or Graduated filter then below Defringe I get a box marked Color. What does this box do.

    Thanks for the quick reply. This is what I expected but it does not do it very well. For example If I have a light blue background and select 100% Blue in the Color box I would expect it to increase the blue but it does not really do this.

  • In Word I want to bring the color box out as a separate box in the screen.  I used to could do this, but I no longer can.  Any help?

    In Word I want to bring the color box out as a separate box in the screen.  I used to could do this, but I no longer can.  Any help?

    you cannot create folders for photos on the iPod Touch. you must currently do it on a computer by syncing the iPod with a photo program, and creating folders within that program and syncing them over. kinda stupid, but hopefully they'll fix it in an update soon.

  • Randomized Colors are Too Dark. Questions on Color Boxes

    Hey all,
    I am attempting to change the color of the plots on a mixed signal
    graph remotely using the "color box" control which works fine; however, I
    am also setting the color boxes to a random color when the program
    first starts up which is where my problem lies.
    What I currently am doing is that I have a random number generator
    pumping out a number after which I multiply the number by 10000000, just
    to give me some colors brighter than black, and then I have that wired up to
    the color box control I am setting the random color on. The problem with
    this is that although it does produce some decent colors some of the
    colors produced are quite dark and pretty hard to see on the mixed
    signal graph.
    I could make the graph background a different color if I have to in
    order to see a majority of the colors that come out, but I would much
    rather just have the colors come out more on the bright and colorful
    side.
    So I have two questions for you guys and gals:
    1) How do the colors of the colorbox get determined using the unsigned 32 int?
    One such example of why I am confused is that the number that I have
    going in is 5726420 from the random number generator (+ being
    multiplied), but on the colorbox control the RGB value is R:87 G:96
    B:212. Why is that?
    2) Is there any kind of algorithm out there that someone has done
    that can produce values randomly that will give kind of neony colors? or
    anything semi-bright for that matter?
    Any help is very much appreciated!
    Ionized
    Solved!
    Go to Solution.

    Use "RGB to color" from three random U8 (o..255) values to generate a color. (double click it to open the VI to understand the structure of the color data type )
    LabVIEW Champion . Do more with less code and in less time .

  • Gradient Stop Color Box DIsabled

    I can't seem to get a color gradient in ID CS4, just grayscale. I go to the "New Gradient Swatch" screen, name it, select "Linear," but the "Stop Color" box is disabled. Probably something very basic I'm not doing here. I can get color on my document as basic fills, but only B&W gradients. Can anyone advise? Thanks.

    Yes this is an undocumented "feature".
    By clicking around I discovered you can get the color swatch selections to appear in the New Gradient Swatch dialogue by clicking the right (black) end of the grascale ramp at the bottom of box.
    Note to everyone - When someone has a odd complaint it is usually not productive to merely quote from various help docs.

  • How do I create multi colored boxes using CSS3

    OS - Windows 7 using DW Cs5.5
    I need to create a screen with lots of equally sized colored boxes with text colours that will be visible easily within them.
    I have a class set up as follows:
    .yellowbox {
        font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
        font-size: small;
        color: #F00;
         background-color: #FC3;
        text-align: center;
        vertical-align: middle;
        margin: 4px;
        padding: 4px;
        clear: none;
        float: left;
        height: 10em;
        width: 30%;
        position: relative;
        border: thick solid #F00;
    This displays a box that is yellow with a red border.
    With a set of 9 divs of this class, I get 9 boxes arranged as a 3x3 grid in a 960px wide container.
    How do I modify the CSS so that the background color changes with each box, and the text color is always in a color that is readable?

    First change the CSS as follows
    .box {
        font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
        font-size: small;
        color: #F00;
        text-align: center;
        vertical-align: middle;
        margin: 4px;
        padding: 4px;
        clear: none;
        float: left;
        height: 10em;
        width: 30%;
        position: relative;
        border: thick solid #F00;
    .yellow {
       background-color: #FC3;
    .blue {
       background-color: blue;
    Then use the following markup
    <div class="box yellow">
    or
    <div class="box blue">

  • Color box in toolbox looks strange + can only color in 1 color

    I am having 2 issues and assume they are related.
    1) Everytime I draw with the pencil tool, it fills in with pink and a black stroke (yes, the fill stroke box is unchecked). This happens no matter what colors are chose as fill/stroke.Afterwards I can change the colors but I would like to be able to draw plain strokes without it filling in pink every time...
    2) As you can see in attached image, the color box looks different than usual.
    Any help would be greatly appreciated!

    You have fill and a stroke applied to the layer so now every time you draw on that layer.
    In the appearance panel double click the layer item and then you will see the stroke and pink fill make the fill none and the stroke none as well or delete the stroke and the fill and apply the stroke to the path.

  • SMARTFORM - Coloring boxes

    Hi All,
    I have a requirement where I need to display the boxes in a different color on a smartform. The outline of the box has to a different color.
    Is there any way we can do this? If so please give me the steps to do so.
    I know that the color of the text can be changed by creating a new style using the t.code SMARTSTYLES.
    Also please let me know if we can have different background colors for different boxes.
    Thanks a lot for your time.
    Sandeep

    Hi
    first create a text for any window.then double click on that text then select output options then you find box and shading tab.under that you find color there you find on edropdown then select it there you find different colors then select one
    you select color under frame tab then only outlined color box is occured.
    if you select color under shading tab then you total find color box.

  • How to make a round color box?

    Can anyone walk me through the steps in making a round color box?
    Thanks in advance.
    Solved!
    Go to Solution.

    Do you need a color box because you want the user to pick a color or you want the vi to spit out a color? Or do you want the color box for some other reason?
    If you want to make it open a color picker pallette, I don't know of a way. However you could always make a round decoration, make sure it is on the top layer and the refnum for it should be This VI.Panel.Decos[0], and then you can programmatically change it's color via a property node. See attached.
    Message Edited by jaraalmonte on 12-16-2009 03:02 PM
    Attachments:
    colors.PNG ‏11 KB

  • Can anyone plz tell how to bundle a color box?

    Hi all, 
    I am trying to pass the color of a color box control from one vi to another vi by bundling it into a cluster and passing the values. There are some other values also which are bundled along with the color. In the second vi when i tried to unbundle the cluster passed from the first vi and then wired the color passed, to a color box, it is getting connected and showing the correct color . But when i am trying to connect the whole bundle to a cluster, it is not gettting connected because of the color box in the cluster. 
    Can anyone please tell me how to solve this problem. I have herewith attached my 2 vi's which i am working with.
    Thankful regards,
    Nitz
    Solved!
    Go to Solution.
    Attachments:
    vi1.vi ‏27 KB
    vi2.vi ‏11 KB

    Hi Nitzy,
    gaa, I'm color blind now
    Well, in your vi2.vi you call a subVI (inputmodule2), which you didn't attach... There's no direct connection between vi1 and vi2...
    -You also have a big race condition in your vi1 because of all those colorbox locals - when more than one condition is true you can't predict which color is used...
    - Why don't you use UnbundleByName?
    - VI2 shows no wiring error...
    - Why don't you use a cluster in VI for all your inputs? You can hide the border and place the cluster elements in the same way. No need for several locals for initialisation and no need for a bundle node...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

Maybe you are looking for

  • Tcode to find Report History for Reports KE30

    Hi All, We have a lot of reports sitting in the system. We want to delete the reports which have not been used by any of the users since 2004 and also the COPA forms that these reports are based off of. Is there any transaction that can give me the h

  • Down Payment with reference capital PO (Down Payment Entry)

    Hi, This is regarding Down Payment entry. While making Down Payment with reference capital PO including taxes (f-48) we are getting the entry as below Vendor A/c                                                   Debit Asset   A/c                     

  • Where can I get a USB cord for a 2620?

    Just bought a 2620 from an online auction and when I got it there wasn't a USB cable. Didn't know it didn't come with one! Does it take a special kind of USB cable? The one for my old printer was made just for that printer (plug in to printer was jus

  • Upgrading my Pro

    I bought a late 2008 Mac Pro (its the fully aluminum kind) and it came with 2 GB of memory, 2.4 GHz and 150 GB capacity. While I have an external hard drive, I'm always having to pull stuff off my laptop onto there. I was pursuing the Apple website a

  • Can't load JdbcOdbc library on Win95`

    I have set up my data source name and it is present in the odbc.ini file in C:\windows I compile and execute the sample code and the Jdbc-Odbc Bridge loads but then it tries to load the JdbcOdbc library and can't. Here is the output: DriverManager.ge