Question about class icons

So I learned today that a child class's icon is created by merging the child's icon as displayed in the class properties with the parent's icon as it appears in the parent's properties (the child's icon being the top image in the merge and the parent's the bottom). This isn't obvious from normal operation since the default icons are the same size and thus the child's icon perfectly overlaps and thus displaces the parent's. However, I drew an icon that extends a little bit beyond the bottom of the border of where the default icon normally goes (in the parent icon). This change was propogated to my numerous child classes, and now the icon is cut off on like 100 vis and it looks dumb.
Technically, this doesn't change anything about my program. Since I never actually place the child vi's on a block diagram, I never see the icons except when editing the child vis or when they are calling each other (one child vi calls the other, which is rare). The code is only brought into the main vi via dynamic dispatch. That said, I'd love to know if there is a way to override the default behavior of how labview builds these vi icons. It's driving the pedant in me crazy.

Hi majoris
could you post an example of this so I can look at it more closely?
Joe Daily
National Instruments
Applications Engineer
may the G be with you ....

Similar Messages

  • Questions about classes

    Hi,
    I finally upgraded from Flash 5 to CS3 - big difference :-)
    Reading the first half of an ActionScript 3 book left me
    quite confused about classes - what they are, how you handle
    multiple classes, how you use one class from within another etc.
    Are there any simple-speak tutorials out there that explain
    more about how to use classes?
    Specifically:
    I am trying to use classes to run multiple animations at the
    same time, i.e. using randomized movement for multiple objects on
    my stage.
    First issue is: If I do what I learnt in the book and simply
    create one .as file and have that be the document class, how can I
    prevent it from being run before all the elements on the stage have
    been loaded through a slow network connection?
    Second issue: I'd rather have "dormant" classes sitting
    around and call them once my stage is ready, but I have no idea how
    to handle multiple classes. I played with it for a while and then
    gave up and put my code into a frame, but that caused further
    issues. Again, any tutorials out there or any other advice you can
    give me? I am trying to start some class code at a certain time and
    use it to attach a Frame Event listener to a Sprite that I create
    inside the class.
    It looks easy in the book, but when I try to do my own stuff,
    it just won't do it...
    The book assumes (so far) that you want to run your code
    immediately once your movie starts, but I don't want that...
    Thanks!

    Yes, I realized later that _root etc. is actually as1 code
    from my days of Flash 5 :-)
    All I need is to know how to access a movieclip on the stage
    that was placed using the IDE from within a class, and how to
    access a class and call its methods from within another, and I can
    teach myself the rest...
    So, if I place something with the IDE, doesn't it show up in
    the display list? I should be able to control those elements, too,
    shouldn't I?
    Or do I have to use Actions rather than classes for those
    elements?
    I probably read 5 different articles/ebooks on the topic of
    classes and OOP in AS3 already, and none gave me the answer I
    needed.
    But I will have a look at the site you mentioned.
    Thanks!

  • Question about Classes

    I have a question concerning classes. In my main program I have a list box. I have gotten the index (using getSelectedIdex method) from the list box to use with my array. What I want to do is match the list box index with the array index to get the correct price from the array. I can do this in the main class, but was wondering if I could just do the calculations in another class. Can I pass the index of the list box to another class in order to do the calculations? I figure I could put the array in the other class too and match them. In order to do this, what would the class data member look like for the list box index that I have passed? I have tried and get errors, so was wondering if there was another way I can do this
    Thanks so much for your help

    I have a question concerning classes. In my main
    program I have a list box. I have gotten the index
    (using getSelectedIdex method) from the list box to
    use with my array. What I want to do is match the list
    box index with the array index to get the correct
    price from the array. I can do this in the main
    class, but was wondering if I could just do the
    calculations in another class. Yes you can, but why? The only reason to do this from a design point of view would be to seperate the logic into another class so that;-
    1. you might reuse the class in the future.
    2. the main method class has become large and cumbersome making it difficult to find all the methods.
    3. There are a variety of methods and subroutines in your application so that the logic in your program will be improved in terms of readability and future maintenance by creating seperate class files.
    4. 'whatever' other reasons (?)
    Can I pass the index of
    the list box to another class in order to do the
    calculations? I figure I could put the array in the
    other class too and match them. In order to do this,
    what would the class data member look like for the
    list box index that I have passed? I have tried and
    get errors, so was wondering if there was another way
    I can do this
    Sooner or later the would-be java programmer has to change or make the transition from using java as a procedural language and develop programs along more OOP lines. The answer to your question is "yes of course you can do this" and simply from the point of view of learning how to pass an argument to a different class, then yeah, learn how to do this.
    >
    Thanks so much for your help
    Gazoontite xxx

  • Question about classes/Directories

    I've been using Java to learn programming for a while now, so this question may not belong here. It seems to be more of a general question, however, not code related.
    How does java work with directories? Say I had a project, and for some reason I wanted different java class files to be in different directories. How does java handle this? Say for example:
    1.) Main class is in C:/blahblah/Project/ and the other classes were in C:/blahblah/Project/src/?
    2.) Main class is in C:/blahblah/Project/src/ and the other classes were in C:/blahblah/Project/?
    3.) Main class is in C:/blahblah/Project/src/ and other classes were in C:/blahblah/Project/bin/?
    I know these may be kind of stupid examples, but I just wanted to know how such things worked for future reference. Thanks a ton!

    {color:#3D2B1F}It sounds like you need to learn about packages: [http://java.sun.com/docs/books/tutorial/java/package/index.html] {color}

  • MenuStrip and a Question about Class win32_product

    Hello,
    I have a bunch of questions I'm hoping someone can answer.
    1.) I would like to add a menu separator and a checkbox under a dropdownitem for a toolstripmenuitem
         Similar to what you would see in ISE or Internet Explorer.
         I then need to pass the state of this checkbox into a function
    2.) I have created a file menu item and would like to create a separator and then add a list of MRU items restricted to only displaying the five previous opened config files.
    3.) Can someone propose an alternative to using the get-wmiobject win32_Product class
    The below function I wrote to get the Product Version for some VMware products, but it is slow making the initial connection.   Looking at the Uninstall registry key won't work because it doesn't contain the product version.
    I know it looks odd.  I could not find a good way to detect which servers the products were installed on.   So instead I pass the servers that would host these products based on our build standards.
    Function get-version($vcenter,$sso,$vum,$credentials) {
    Write-Host "Getting Version information. This usually takes awhile. Be Patient " -NoNewline
    $Roles = "VMware vCenter Server","VMware vCenter Inventory Service","VMware vSphere Web Client","vCenter Single Sign On","VMware vSphere Update Manager","vSphere Syslog Collector"
    $i = 0
    $output = @()
    $Servers = "$vcenter","$vcenter","$vcenter","$sso","$vum","$vum"
    $ErrorActionPreference = 'silentlycontinue'
    ForEach ($input in $Servers) {
    IF ($psversiontable.psversion.major -ge 3) { Write-Progress -activity "Getting Version Information - Takes awhile. Be Patient." -status $Roles[$i] -PercentComplete (($i / $roles.Length) * 100) } Else { ticker }
    $object = New-Object PSObject
    $object | Add-Member NoteProperty "Role" $Roles[$i]
    $object | Add-Member NoteProperty "Hostname" $Servers[$i]
    $object | Add-Member NoteProperty "IP Address" (Get-WmiObject Win32_networkadapterconfiguration -ComputerName $Servers[$i] -Credential $credentials | ? {$_.IPEnabled} | Select-Object IPaddress).IPaddress[0]
    $object | Add-Member NoteProperty "Version" (Get-WmiObject win32_Product -ComputerName $Servers[$i] -Credential $credentials | Where-Object {$_.Name -eq $Roles[$i]}).version
    $output += $object
    $i++
    IF ($PSVersionTable.PSVersion.Major -ge 3) { Write-Progress -activity "Completed Getting Version Information" -Completed } Else { write-host "...Done!" -NoNewline }
    write-host ""
    $output
    } # End Function get-Version
    Walter

    Your code doesn't relay make much sense.
    What is this line for:
    $Servers = "$vcenter","$vcenter","$vcenter","$sso","$vum","$vum"
    Funtion get-version($vcenter,$sso,$vum,$credentials
    Why are you using credentials.  Only and admin can call remotely?
    Are you trying to get all of these roles? Aren't these produces?
    $Roles  = "VMware vCenter Server","VMware vCenter Inventory Service","VMware vSphere Web Client","vCenter Single Sign On","VMware
    vSphere Update Manager","vSphere Syslog Collector"
    ¯\_(ツ)_/¯

  • A question about class and interface? please help me!

    the following is program:
    interface A{
    public class B implements A{
    public static void main(String [] args){
    A a = new B();
    System.out.println(a.toString());
    }i want to ask a question, the method toString() is not belong to interface A, why a can call method toString()? the interface call the method that isn't belong to, why? please help me...

    because a.toString() call the method toString() of class Object because B implements A, but extends Object and in the class Object there is a method toString(). infact if you override the method toString() in class B, a.toString() call toString() in class B.
    try this:
    interface A {}
    public class B implements A
      public String toString()
        return "B";
      public static void main(String [] args)
        A a = new B();
        System.out.println(a.toString());
      }by gino

  • General question about classes

    Hi every one,
    I have an application that works but i'll like to optimize it, regarding about speed and system ressources. For resume and represent diagrammatically the application I wrote, there is a first frame (the main menu) with severals buttons. When I push a button I show a new frame with a query resultset displayed inside.
    Theses second frames are all very similars, just a few things are differents between one and another (sql string of the query, and some controls may be visible or not).
    So there are many solutions to write it :
    1- I can make a class representing this second frame and each time I push a button from the main menu, I create a new Object with this class and when I quit this frame I do a "dispose" of it.
    2 - (the solution I got) I create an Object with the model of this second frame once and for all, and when I push a button I set visible this frame and call a method to change some parameters, when I quit the frame I set it hide.
    I think second option is not to bad and the first one is very heavy, but If I created a class B that extends my second frame A (that contains the main code for displaying results) and each time I push a button from the main menu I created an object from B type, is it a good idea ??
    Hope you understand my problem, and hope anyone will give me an idea...

    Hi rainek and ty for your attention,
    Yes you understood right :
    my app creates Frame 1 with buttons and show it, and I create on the background a raw version of Frame 2 shown, and with changed parameters when button is pressed.
    But I don't not extend Frame 2 with a SubFrame 2, I just wonder if it would be a good thing to create subframe 2 and instance it each time I push a button from Frame 1, instead to use the same Frame 2 raw version (storing it in a file config indeed) from the background. I wondered, if when I instance for the second time a subframe 2 it was speeder because an object subframe 2 as already been instancied before.
    You know my problem was also that when I created Frame 2 in the background before create Frame 1, it gave my troubles with Frame 1 display (cf. my topic :http://forums.java.sun.com/thread.jsp?forum=57&thread=231897), so now I create this frame 2 raw version the first time I push any button, but of course there is a litte big longer time answer this first time. (I thank too, to create Frame 2 raw version in a thread to avoid frame 1 display troubles)
    Hope I'm clear and you understand me, for resume in a generic problem, I wonder know if when i have this config :
    Frame 2,
    Subframe2 that extends Frame 2
    if i do
    Subframe2 myframe_a = new Subframe2 (<parameters_a>) and
    Subframe2 myframe_b = new Subframe2 (<parameters_b>)
    myframe_b is created more quickly because myframe_a as been instancied before
    Any way ty very much for your answer rainek !!

  • Question about photo icons on songs.

    Hey guys, I got a simple question to ask.
    Well, I just got a new 30GB Ipod Video today, and it works fine. However, after I added all of my songs to my ipod, I also wanted to upload the little photo icons next to them as well when you play a song. So I put one photo on an entire album, but then when I disconnected my Ipod, it's not there! Can someone help me?

    Since the iPod might have updated before you applied the artwork you may have to update the iPod again. Press "File"> "update iPod" to update it without having to disconnect and reconnect your iPod.
    -Mike

  • A question about classes

    Hi all,
    This is a general question, hope it is in the right forum.
    Lets say I have a main document class, declared in the property window. I can easily create new instances of a movieclip in my library by simply creating them in my document class and then using addchild to put them on the stage. Now lets say I have a separate external class that I am importing into my document class. How do I create instances of the movieclip from my library in that external class. All I want my document class to do is import classes and let them do the work so to speak. I know I can create the movieclip instance in the document class and pass it as a parameter when I import the external class but what if I want to create it there?
    I hope that makes sense, I am sure it is very simple but I am tired of having massive long document classes!
    Thanks in advance.

    Hi, sorry I know you answered this but I have just done a quick test file to try the instantiation,
    the movieclip is not showing, the movieclip is linked out with a class of mcSquare.
    //document class
    package {
        import flash.display.MovieClip;
        import external;
        public class document extends MovieClip
            public var externalClass:external = new external();
            public function document()
    //external
    package {
        import flash.display.*;
        import flash.utils.getDefinitionByName;
        public class external extends MovieClip
            public var square_mc1:mcSquare = new mcSquare();
            /*public var square:Class = getDefinitionByName("mcSquare") as Class;
            public var square_mc1:Object = new square();*/
            public function external()
                //square_mc1.x = 43.5;
                //addChild(DisplayObject(square_mc1));
                addChild(square_mc1);
    The commented code is just attempts after googling.
    Again apologies for reposting, I thought that had cracked it
    Thanks

  • Question about classes hyargie

    hello, my english is very bad so, but i think you can understand my problem:
    i'm creating a game, in Java using jEdit and have 3 classes: one application with the static main, called Memory. That one creates another one, called Game. It's a canvas. Till here no problem.
    But when I try to create from the the class Game a class Kaart, he'll give an error:
    the code looks like this
    public class Game extends Canvas
    private Kaart kaartje;
         public Game( int dinges )
    kaartje = new Kaart( 27, 16 );
    add( Kaartje ); //<---------------------
    this is the error:
    C:\Jan\proggen\Game.java:34: add(java.awt.PopupMenu) in java.awt.Component cannot be applied to (Kaart)
              add( kaartje );
    ^
    1 error
    anyone know about this..?
    thanks jan

    What are you trying to do?
    The message says that you need to pass a PopupMenu to add (you are calling add on the Canvas). So, apparently, kaartje is NOT a PopupMenu (or subclass). What does Kaart look like?

  • Question about desktop icons

    Hi, My question is what are the settings that need to be changed to get rid of the icon menu that appears around desktop icons when your cursor is over the icon? The feature I'm refering to comes up around the icon and has a button to resize the icon a button to rotate the icon a button to close the icon and one to give the prperties. I have several different distro that use kde4.2 or 4.3 and all have this disabled by default. At this point the only distro I have with this annoyance on the desktop is Arch. I tried to google this question but without knowing the proper term for this "feature" I was unable to find an answer. I hope I have descibed it well enough here that someone can tell me how to disable this great annoyance.

    Right click the desktop and select "lock widgets"

  • Question about class PackedInteger.

    Dear All,
    i was searching for sth that can read an integer by using FileInputStream , i mean to take it in the form of an integer not bytes as usual , and i found this class called PackedInteger on that link :
    http://www.oracle.com/technology/documentation/berkeley-db/je/java/com/sleepycat/util/PackedInteger.html#readInt(byte[],%20int)
    mm actually i'm not sure about the source of that class , or who published it , alsoo i'm not sure if it would be useful in my case ,
    can any body help me ?, if u have any ideas about how to read and write inetegrs from to files i would be grateful to hear from u .
    thanks in advance.
    Regards,
    D.Roth

    hey guys , i found this also , what do u think ?
    readUnary
    public int readUnary()
    Reads a unary integer from the already read buffer.
    Returns:
    the decoded integer
    , in a class called BitFile .

  • Probably simple question about mailbox icons

    Hei folks,
    Sorry if this topic has been answered before, but my search didn't bring anything suitable up.
    For the question: I have 3 Imap-Accounts, and each of these got another collection of icons in Mail:
    image: http://img204.imageshack.us/my.php?image=sidebarnh8.jpg
    The accounts named Web, FSMB and myTUM are all 3 IMAP Accounts.
    So why does
    -> Web have an icon within my inboxes collection WITHOUT subfolders but WITH that grey (@) icon
    -> FSMB have an icon within my inboxes collection WITH subfolders AND WITH that grey (@) icon
    -> myTUM have an icon within my inboxes collection WITH subfolders but NO grey (@) icon
    I mean, I think I have configured them all the same way, and it just bugs me a little, I'd like to have them all under 'My Inboxes' or how it's called in English, WITH subfolders, but get rid of the grey ones that just use up space!
    If there IS a solution (and probably it's darn simple and can be done with 5 clicks, huh), it would be really cool.
    Thanks for reading (and perhaps answering),
    Jojo
    (PS: as always, please excuse my bad English)
    PS2 & edit: Also - why do I have only outgoing mailboxes for web (imap) and gmx (pop) and not the others? arg!

    Hi Jojo.
    It seems to me that you posted in the wrong (Panther) forum, but the answer would be the same.
    The accounts for which Mail shows mailboxes on the server as subfolders of the account's Inbox require INBOX to be put in Preferences > Accounts > Advanced > IMAP Path Prefix for Mail to handle them properly.

  • Question about JButton icons

    I'm displaying a panel with three JButtons in one row, each of them displaying an icon. Each has an action listener registered to it. I want to change the icon when the button is pushed to reflect a different status. I remove the button from the panel, replace it with the new icon, then redisplay it. The problem is, the new button is added to the panel at the end of the row, and the remaining buttons are moved over. Is there any way I can just replace the old icon with the new one and redisplay the button without removing it from the panel and replacing it? It is important that I preserve the sequence in which the buttons are displayed.

    4merSnake wrote:
    If I do the "remove" and use the offset as you demonstrated, it works. If I just use the offset, it actually adds another button to the panel. The old one has to be removed first.
    Unless there's an easier way ...Again, there is: just swap icons. Here is an SSCCE to illustrate what I am proposing. This small app creates an array of 8 ImageIcons and swaps a buttons icon on press of a button. It is currently set up for 8 small images named image00.jpg to image07.jpg located at IMAGE_PATH = "src/dy08/m02/a/images/"; Just copy this program, paste it, have an a couple of same-sized and named images available, change the program's constants accordingly, and run.
    import java.awt.Dimension;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.io.File;
    import java.io.IOException;
    import java.text.DecimalFormat;
    import java.text.NumberFormat;
    import javax.imageio.ImageIO;
    import javax.swing.ImageIcon;
    import javax.swing.JButton;
    import javax.swing.JComponent;
    import javax.swing.JFrame;
    * creates an array of ImageIcons and swaps a button's icon with each
    * press of the button
    * @author Pete
    * 4/28/08
    public class SwapIcons
        // ** these will have to change depending on location, name, size and number of images
        private final static String IMAGE_PATH = "src/dy08/m02/a/images/";
        private static final String IMAGE_NAME = "image";
        private static final String IMAGE_EXTENSION = ".jpg";
        private static final Dimension IMAGE_SIZE = new Dimension(180, 115);
        private static final int ICON_COUNT = 8;
        private JButton button = new JButton();
        private ImageIcon[] icons = new ImageIcon[ICON_COUNT];
        private int iconIndex = 0;
        public SwapIcons()
            NumberFormat nf = new DecimalFormat("00");
            for (int i = 0; i < icons.length; i++)
                try
                    icons[i] = new ImageIcon(ImageIO.read(new File(IMAGE_PATH + IMAGE_NAME +
                            nf.format(i) + IMAGE_EXTENSION)));
                catch (IOException e)
                    e.printStackTrace();
            button.setPreferredSize(IMAGE_SIZE);
            button.setIcon(icons[iconIndex]);
            button.addActionListener(new ActionListener()
                @Override
                public void actionPerformed(ActionEvent e)
                    buttonAction(e);
        private void buttonAction(ActionEvent e)
            iconIndex++;
            iconIndex %= icons.length;
            button.setIcon(icons[iconIndex]);
        public JComponent getButton()
            return button;
        private static void createAndShowUI()
            JFrame frame = new JFrame("SwapIcons");
            frame.getContentPane().add(new SwapIcons().getButton());
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.pack();
            frame.setLocationRelativeTo(null);
            frame.setVisible(true);
        public static void main(String[] args)
            java.awt.EventQueue.invokeLater(new Runnable()
                public void run()
                    createAndShowUI();
    }

  • Question about class design

    Hi:
    I am trying to design a web game using JSP, servlets, etc. I have some ideas about the classes I have to create and how to split the work among them. I.e:
    class Player
    - contains the player data like name, nickname, age, etc...
    - have a static method getPlayerById(id) which calls load(id) method.
    - load method calls DBPlayer.load(id)
    class DBPlayer
    - uses Database objetct to get the connetion.
    - static load(id) method executes a "select" query and gets the data from database and create a new Player instance sending the data by constructor
    class Database
    - get the connetion data and connect to database
    I could have a JSP page named showPlayerInfo.jsp which gets the player_id by request. The page calls Player.getPlayerById(player_id) ans shows the data in html format.
    would this be correct?
    If I would like to show the list of players of a game. Could I have a GamePlayerList servlet which uses Database object, get an array of Player objects which can be shown using a JSP page or the GamePlayerList servlet? should the "retrieving player list data" be in DBPlayer instead?
    Thanks in advance for your advices

    There is no right answer. What you have is a model object (Player) a data access object (DBPlayer, normally this would be named something like PlayerDao) and a utilities class to connect to the database (Database or you could call it DatabaseUtil or DatabaseHelper, whatever) Another option for your Database class is to instead call it AbstractDao, have PlayerDao extend it, and in AbstractDao place methods like connect(), rollback() and commit(). One reason you want these methods in either a helper class or a superclass is so you can place your try-catch blocks there and not have to worry about cluttering up the rest of your code.
    In terms of an overall architecture, you should take a look at the MVC pattern. Your Player and PlayerDao objects are your model. Your servlets are your controllers. And your JSP's are your view. It's a fairly standard way of organizing your application.
    You have several options for how to load new players. The first would be as you have done, to place a static factory method in Player. Another option would be to create a separate PlayerFactory object that can create new or return existing or delete existing players. The Servlet would call the PlayerFactory which would delegate to the PlayerDao returning a Player object. In this design, your Servlet would either invoke the PlayerFactory or PlayerDao to save, etc. If you instead want a bit more encapsulation at the price of separation of concerns, you can have the Player object itself have methods like save(), delete(), etc.
    There is no right answer. Designs involve trade-offs and to a large extent personal (or corporate or academic) preference.
    - Saish

Maybe you are looking for