Dynamically controling the size (in pixels) of array elements?

Hey Everyone,
I am writing a large vi where front panel space is becoming a limitation.   One of the elements that I want to display is a 2-D array of boolean indicators (rectangular LEDs).  Is there any way to dynamically resize the elements in the array so that regardless of the number of elements, the entire array is always visible and has a constant footprint.  For example, say the array is 8 x 8 elements, and takes up 160x160 pixels on the front panel so each element is roughly 20x20 pixels.  Then the number of elements shifts to 4x4.  I want the display to stay 160x160 pixels, but the size of each element to double to 40x40 pixels.  Is this possible?
Thanks all,
Matt
Solved!
Go to Solution.

So thank you for two great ideas/examples.  Definitely think I have a couple of very workable approaches.  I have a follow on question about using the intensity graph approach.
First some background.  This indicator is going to show the progress of a sorting operation, 1-4 copies of 1-8 unique items are being sorted into 1-32 containers.  The items arrive at the sorter in random order, are identified, and then placed into the container where they are still needed.  The point of this indicator is to show the user, at a glance, how full each container is andwhich componenets are missing.  I want the elements (columns) to appear different for the unique items, which I know you can't do in an array of booleans.  So I had already dumped the boolean approach for an array of colorboxes, and it was the color boxes that I was trying to dynamically size. There is still a boolean array to keep track of if an item has arrived, but that array drives the array of colorboxes where each type of item is color coded by assigning a gray value to colorbox for false, and a particular color if true.  See attached, which works pretty well (detailed adjusts will make it just right).
I think the intensity graph will look much nicer though, so here is the question:
How do I map the different colors onto the intensity graph so it looks like the colorbox array without the lines?  The attached get vi puts out a different value for each yes/no, which is to say I already know how to take the boolean and convert the 1 state to a unique number, what I don't know how to do is map that number into a particular color on the intensity graph.
Thanks guys.
Super helpful as always!
Matt
Attachments:
Puzzle_MM.vi ‏42 KB

Similar Messages

  • How do I control the size of my photos in iWeb?

    Hello
    I wish to ask if it is possible to control the size of a photo in iWeb when publishing photos.
    What I want is that people can press on any photo in my collection and see it in high resolution. But at the moment it is messing with my photos. Some come up tiny regardless of them being a 4MB Pixel shot, and most of them if not all of them are restricted to one size...
    Thank you...
    -Steve

    iWeb resizes photos in the following cases -
    When using the of the photograph templates where you drag and drop your pictures:
    1) Size is capped at 800px x 800px for the slide
    2) Files are compressed, usually ~120KB\
    3) New thumbs are created (the small image you click on); those tend to be 35-45KB.
    If you add a shadow, reflect or graphic option - odds are iWeb will convert your JPEG into a PNG and file size mushrooms. I've been created very compact banners, but due to PNG coversion the size has gone up by 6-8x...
    I have NOT looked into just adding a photo to page and seeing what happens to the file size. Most of my tug of war has been with slide show and trying to understand why the 300-500KB files I was using were looking so bad. Now that I know iWeb is doing, I can sort of work around it.
    It doesn't mean I'm happy. I'm going to add a gallery page with my favorites, format for roughly 1000x800 and keep the file size around 400 KB. I do all the file resizing in Photoshop CS2.
    To put all this in perspective, i have around 325 picture uploaded - most were resized to 450 KB for the web. That 146 MB just for pictures. Add another 10 MB for web content, etc. I thought ~160MB should be used up on the iDisk. Due to iWeb's compression, usage is only 70 MB for this site.
    www.pebbleplace.com

  • How can I control the size of a cell in the GridBagLayout?

    Hi,Swing Gurus
    I am developing a swing-based program using JBulider5 enterprise.
    It seems to me that the GridBagLayout is really a hard nut!
    How can I control the size of a cell in the GridBagLayout?
    It seems that I cann't control the size of a cell directly.
    But how the size of a particular cell is determined when I switch the layout manager from XYLayout to GridBagLayout?
    Thx in advance!
    Regards,
    Justine

    hi,i have not done what you are asking but there are fields like
    COLUMNWIDTH, MINSIZE, MAXGRIDSIZE, PREFEREDSIZE to which you can set the appropriate values and test for your need.hope this helped.bye martian.

  • How can I control the size of the af:InputText?

    Hi,
    How can I control the size of the 'af:InputText' on the UI, without using columns & rows attributes. Even though I am using width & height attributes, the changes are not getting reflected in the UI.
    Thanks,
    Rajesh.

    Hi,
    It is inside a 'af:PanelBox'. So, the parent container also determines the size of the child? Here I need a create a 'pidgin chat window' kind of an interface with a fixed size top-level container, inside which I willl put all my components. The code looks something like this:
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1" partialTriggers="it1">
    <af:messages id="m4"/>
    <af:form id="f1" partialTriggers="it1">
    <af:panelBox text="" id="pb1" background="dark" type="stretch"
    titleHalign="start" ramp="highlight"
    inlineStyle="width:350pt; height:500pt; margin:0.5pt; padding:0.5pt; border-width:0.5pt; "
    partialTriggers="it1">
    <af:spacer height="15pt" id="s1"/>
    <af:inputText id="ot1"
    columns="82" rows="25" wrap="hard"
    partialTriggers="it1"
    value="#{ChatClientBean.chatLog}"
    binding="#{ChatClientBean.outputChatTextBox}"
    visible="false">
    </af:inputText>
    <af:spacer height="27pt"/>
    <af:inputText id="it1" inlineStyle="width:200pt; height:100pt;"
    valueChangeListener="#{sessionScope.ChatClientBean.sendMessage}"
    autoSubmit="true" partialTriggers="it1"
    binding="#{ChatClientBean.inputChatText}"/>
    </af:panelBox>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>
    Thanks,
    Rajesh.

  • And, in general, how can I control the size of the firefox window?

    The Firefox window has become bigger, even before I clicked "full screen."
    So again, how do I control the size of the window/screen?
    == This happened ==
    Every time Firefox opened

    when opening a link within a window, I want it to open smaller so I can see the window behind it. How can I control that?

  • How to control the size of live data in Coherence?

    How to control the size of live data in Coherence?
    See the following statement:
    Pause times increase as the amount of live data in the heap increases. We recommend not exceeding 70% live data in your heap. This includes primary data, backup data, indexes, and application data.
    --Excerpted from http://coherence.oracle.com/display/COH35UG/Best+Practices                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    In any Java program, it is good practice to make sure your live objects leave some room in the heap for "scratch space." Without this, you will spend too much time in GC, and, in the worst cases, run out of memory. In the general case, you can see how much live data your application requires by looking at the heap used after a full GC's. For Coherence, you should ensure that live data, as you say, is under 70% of the maximum heap size.
    Coherence provides you tools to help enforce this policy. [http://coherence.oracle.com/display/COH35UG/local-scheme] describes how to size limit your cache. By implementing an eviction policy, you can control what happens when a size limit is exceeded.

  • How to control the size of SVG images in epub files?

    There is unfortunately no support for SVG files in InDesign.
    Most of my images in jpg convertes nicely, but the small ones do not.
    Therefore I want to use SVG files which I have created in Illustrator.
    But how do I set the size in the epub file? Right now, whatever I do, they come out too big and I don't know how to control the size.
    Is there a program, like Sigil or other, that can place the image for me - I'm no html wizard you see....

    In any Java program, it is good practice to make sure your live objects leave some room in the heap for "scratch space." Without this, you will spend too much time in GC, and, in the worst cases, run out of memory. In the general case, you can see how much live data your application requires by looking at the heap used after a full GC's. For Coherence, you should ensure that live data, as you say, is under 70% of the maximum heap size.
    Coherence provides you tools to help enforce this policy. [http://coherence.oracle.com/display/COH35UG/local-scheme] describes how to size limit your cache. By implementing an eviction policy, you can control what happens when a size limit is exceeded.

  • How to control the size/posit​ion of LabVIEW DLL front panel in MFC applicatio​n?

    I would like to make a MFC application which loads a DLL generated by LabVIEW application builder. How can I control the size and position of the front panel in my MFC application? Thanks.

    Did you build the DLL from Labview yourself? If so, you just add another VI to the list. This VI accepts the Title of a front panel and top,left,right,bottom value of the front panel (VI property WindowBond). I'm not familiar with building DLLs using Labview so I really could not help you on how to build the DLL, but I believe it can be done (multiple VIs as multiple functions in a single DLL).
    To get the windows bonds for a vi, you need to use VI server property. Check out the examples under labview directory. There are plenty of them to demostrate how to use this feature.
    Joe

  • Controlling the size of You-tube links

    Is there a way to control the size of the graphic from an You-Tube link?
    I have embedded a link to the clip in an HTML snippet but don't seem to be able to affect the size of the initial image without truncating some of the image.
    Anyway to expand or decrease this viewing box proportionately?

    What's the URL of your site so we can examine it first hand? The snippet's size can be enlarged and will stay that way as long as you don't hit the Apply button after. Maybe that will do what you need.
    OT

  • Controlling the Size of the ADR directory - 11g

    With the new ADR directory for problem diag. information such as traces, dumps, alert logs etc, what is the best way to control the size of the files system? Is there an Oracle provided tool for purging old files or do you need to write your own script?

    Nothing has ever purged the alert log in Oracle and if something did I would advise every DBA to disable it immediately.
    The XML version of the alert log will maintain itself. The text version, as stated above, works the same way it always has and hopefully always will.
    As the DBA it is your responsibility to read that file, at a minimum, once every day. While you are doing that you can archive it, drop it, and truncate it.
    If it is growing too large you likely aren't doing your job. <g>

  • Dynamically set the size of the VIEW

    Hello,
    I am looking to set the size of my VIEW which is called in following way:
    IF iv_show_in_pop_up EQ abap_true.
        wd_this->raise_simulation_pop_up( ).
    I want to set of the size of the VIEW if it a pop-up.
    ENDIF.
    How can i get access to the view and set the size. Please Help.
    Regards,
    Piyush

    Hi Piyush,
    Check what Anzy has to say in [here|https://forums.sdn.sap.com/click.jspa?searchID=18635339&messageID=3289078]:
    "You have to go to specific view , which will be embedded in the pop up window.In the view go to ROOTUIELEMENTCONTAINER and set the width and height.This way you can restrict the size of the pop up window."
    This is [another approach|https://forums.sdn.sap.com/click.jspa?searchID=18635339&messageID=5836334] suggested by Abhimanyu Lagishetty for dynamically setting the size of your window:
    "Pass the URL like this to the create_external_window
    javascript:window.moveTo(0,0);window.resizeTo(screen.width,screen.height);window.location.href="http://google.co.in";
    Instead of http://google.co.in write your URL it will maximize the window"
    Regards,
    Uday

  • Is there a way to control the size of the pictures taken by iPhone?

    The photos taken by iPhone are fairly large photos and require quite a bit of time for transfering when taking hundreds of photos.  Is there any settings in iPhone that can control the size of the pictures being taken?  Thanks

    Sorry, no. You might try looking in the App store for a third-party app that provides this functionality, but such is not natively built into the iPhone.

  • Controlling the size of the popup window when using target

    Using the anchor tag and the target attribute (<a
    target="_blank"...>), how does one control the size of the new
    window? Or is this not possible? Thanks!

    use javascript. if you want to put it in <a> tag, then
    you can do it this way:
    assuming your page is index.cfm, then:
    <a href="index.cfm" target="_blank"
    onclick="window.open('complete
    URL','name_of_window_to_open','width=100,height=50')">test
    link</a>
    OR use other tags such as
    <span style="cursor:pointer"
    onclick="window.open('complete
    URL','name_of_window_to_open','width=100,height=50')">test
    link</span >
    If not familiar yet with window.open, go to this link for
    reference:
    http://msdn2.microsoft.com/en-us/library/ms536651.aspx

  • How to control the size of Database's image

    hi,
    I have already saved image in database, & i also can retrieve image from database. But My problem is that when i save big image then it shows with it's original size. But i want to see its size what i want? But how this possible?i want to see it's small size. i cannot do it. I know how to control the image with ImageIO . But i don'nt know how to control the size of an image from database. I cannot do it. Please Help me.
    Thanks
    bina

    Hi,
    You can control the database size at technical setting level based on ur requirement. Field name is Size category. 
    Thanks.

  • How to control the size of the database

    Hi all
    Database size will gradually increase day by day is there any tool or possibility to control the size of the database.
    Thanks in advance
    Gowtham
    Moderator message: not directly related to ABAP development, standard "basis" functionality, please have a look in the Netweaver forums.
    Edited by: Thomas Zloch on May 23, 2011 9:16 AM

    Hi,
    You can control the database size at technical setting level based on ur requirement. Field name is Size category. 
    Thanks.

Maybe you are looking for