Clear/fill ComboBox in a Subvi?

I am building an app with 6-8 pulldown ComboBoxes and each of them will be erased and then first met based on a file.  I wrote a small vi to do exactly what I want, but I can't understand how to pass the PropertyNode[tringsAndValues] each ComboBox to the Subvi?  I wouldn't really have to reproduce this code 6 - 8 times in my main VI.

The first thing I noticed is that my original small VI used the Structure of sequence flat to make sure I have everything first empty the ComboBox and then fill - LabView wouldn't even accept this as a sub - VI when I tried to add to my main VI, so I'm breaking the clearing in 1 Subvi and filling in another.  I tried first to setup the VI of compensation which is when I noticed that I had found no original way of referencing ComboBox in my Subvi.

Anyone with ideas?

Steve

Create a reference to one of the terminals of the combobox, and then create a control from this reference.  cut and paste the control in the Sub - VI and use it as a control for the reference in the Subvi.

are you use create-> node-> (property) property?  It's less useful: search the antiderivative of regular property node in the application control pane

Here's what they look like:

Once your Subvi accepts a ref of the comboBox, you can put your combobox 6 to 8 refs in an array and then call your subVIs a for loop.

B

Tags: NI Software

Similar Questions

  • Fill combobox with multiline field

    Is it possible to get a picture of a multiline text field and put this table in a ComboBox?

    I think I should use the split() function, but I don't know how to do this.

    I'm trying to find an easy way to populate a combobox control.

    This topic shows how you can split the value of the value of a field text multiline in carriage returns: http://forums.adobe.com/thread/789976

    You can then use the field setItems method to fill the list box with items area: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.752.html

  • Fill ComboBox with external data

    I have this drop-down list box:

    < mx:ComboBox change = "changeEvt (event)" x = "134" y = "48" > "
    < mx:Array >
    < mx:Object label = 'AM' data = 'ALL' / >
    < mx:Object label = "BM" data = "CM" / >
    < mx:Object label = "CM" data = "FROM" / >
    < / mx:Array >
    < / mx:ComboBox >

    I would like to do this fill a XML file, for example I import

    < empTypes >
    < laborClass lc = 'AM' <>/.
    < laborClass lc = 'BM' <>/.
    < laborClass lc = 'CM' <>/.
    < / empTypes >

    .. .in an XMLList, named said "empTypes" what is the syntax I use for this insert in the comboBox? I don't know how to do so that he can enter.

    M.

    I changed it to filter1=event.currentTarget.selectedItem.@lc; and that the time seems to work :)

  • Using HTTPService to fill Combobox from DB SQL

    I'm having a little problem with the filling of a combobox after I call a httpservice. Showing data, however, it's all appear on a single line over several items to combobox. For example, I get a single line in the drop-down menu that looks like this:

    DATE1, DATE2, DATE3

    instead of get:

    DATE1
    DATE2
    DATE3

    I found this article, but it does not really my problem and I already seem to wear all recommended in this article ( http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=60 & catid = 585 & threadid = 1220768 & highlight_key = y & keyword1 = combobox).

    Part of my PHP script:
    -----------------------------------------------
    $return = '< horodateurs > ';
    While ($Row = mysql_fetch_array ($result))
    {
    $qrtrdisp is $row ["quarter"];.
    $return. = "< date >." $qrtrdisp. "< / date > ';
    }
    $return. = ' < / timestamps > ';
    Print ($Return);
    -----------------------------------------------

    Part of my MXML file:
    -----------------------------------------------
    "" < mx:Application xmlns:mx = ' http://www.adobe.com/2006/mxml ' layout = "absolute" creationComplete = "getDates.send ()" >

    <!-set call to enter the dates for the shape->
    < mx:HTTPService id = "getDates" url = "https://url/file.php" useProxy = "false" method = "GET" showBusyCursor = "true" >
    < / mx:HTTPService >

    < mx:ComboBox id = "dates" x = "201" y = "6" dataProvider = "{getDates.lastResult.timestamps}" labelField = 'date' > < / mx:ComboBox > ""
    -----------------------------------------------

    Any help would be greatly appreciated.

    Thank you
    Chris

    You may need to structure xml youre differently. You set the dataprovider for the timestamps down, try each date in its own node parent and dot up to getDates.LastResult.timestamps of packaging. (the new node)

  • Fill Combobox with nested XML

    Hello!
    How can I fill a ComboBox with an XML retrieved via a HTTPService?

    My XML looks like

    <? XML version = "1.0" encoding = "iso-8859-1? >
    < xml >
    < node label = value '1' = 'a' / >
    < node label = value "2" = "b" >
    < node label = "21" value = "ba" / >
    < node label = '22' value = 'bb' / >
    < node label = "23" value = "bc" / >
    < / node >
    < node label = '3' value = 'c' / >
    < node label = "4" value = "d" / >
    < node label = '5' value = 'e' / >
    < / xml >

    The output you want in the drop-down list would be

    one
    b
    -ba
    -bb
    Colombia-British
    c
    d
    e

    < mx:ComboBox id = "selectedLevel" dataProvider = labelField 'structure of {}"="label"/ >

    'structure' is an XMLListcollection, looks like my Resulthandler

    structure = new XMLListCollection (event.result.node);


    Can someone give me a hint what is missing?

    Thank you.

  • fill combobox via rpc and arraycollection collection

    Hello

    I have this XML coming via httpservice.

    < types >
    < type >
    < TypeId > 1 < / TypeId >
    < TypeUitspraak > Vonnis < / TypeUitspraak >
    < / type >
    < type >
    < > 2 TypeId < / TypeId >
    Arrest of < TypeUitspraak > < / TypeUitspraak >
    < / type >
    < / types >

    Here's (part of) the code

    Import mx.collections.ArrayCollection;
    Mx.rpc.events import. *;


    [Bindable]
    private var uitspraakTypes:ArrayCollection;

    private void typesHandler(event:ResultEvent):void {}
    uitspraakTypes = event.result.types.Type;
    }


    private function InitApp (): void
    {
    types. Send();
    }


    "" < mx:HTTPService id = 'types' url = ' http://www.emis.vito.be/SBO/haaltypes.asp ' result = "typesHandler (event)" / >

    < mx:ComboBox id = "typeUitspraak" dataProvider = "{uitspraakTypes}" > < / mx:ComboBox >


    in debugging mode in that I can see the arraycollection collection correctly filled
    I want to bind TypeUitspraak node of the xml to a combobox.
    I get [object Object] in my combobox.

    Please tell me what I'm missing here.

    Thank you

    Karel

    Hello
    You ares is simply not enough the only important thing

    ComboBox uses a property called labelfield to show your domain, you must pass a dataprovider and your arraycollection collection a labelfield, in your case TypeUitspraak of penny

  • fill combobox to an xml file

    I'm trying to fill a combobox with data from an xml file, this is supposed to be a simple right to face, but for some reason I can't get it to work. That's what I do:

    I found a solution!

    I don't understand the logic behind it, but it works!

    "I removed the dataProvider ="{cbData}"and labelField="@label "attributes of the

    private void lookUpDataHandler(evt:ResultEvent):void {}
    denomination.labelField = "label";
    denomination.dataProvider = evt.result.allrows.singlerow;
    }

    I someone can explain the reason why the previous code does not work, please do so.

  • Fill ComboBox with XML data

    I would like to fill a ComboBox with data in a simple xml file like this. It's probably quite newbie question, but I couldn't find the answer to the search in this forum and the documentation up to date.


    < root >
    option 1 < item > < / item >
    option2 < item > < / item >
    Option3 < item > < / item >
    < / root >


    I would be very grateful if someone tell me how the ComboBox control to retrieve data from XML file. Thank you!

    I found a way to do it. Here is the code I use to populate a ComboBox control with dynamically loaded XML data (the XML content is in the first post).
    I'm sorry that I have opened a topic for this fundamental question. In any case I hope that the thread is useful for someone. If you think that there is something wrong with the code below, please post a reply.



    http://www.Adobe.com/2006/mxml"creationComplete ="parseXML (); » >


    public var myXML:XML
    public var myLoader:URLLoader

    function parseXML (): void {}
    myXML = new XML();
    var XML_URL:String = 'content.xml ';
    var myXMLURL:URLRequest = new URLRequest (XML_URL);
    myLoader = new URLLoader (myXMLURL);
    myLoader.addEventListener ("complete", xmlLoaded);
    }

    function xmlLoaded(evtObj:Event):void {}
    myXML = XML (myLoader.data);
    combo.dataProvider = myXML.children ();
    }

    ]]>




  • Fill ComboBoxes with some Date Formats

    Hello, I need to show the day, month and year in three separate ComboBoxes for my project. Is it possible to combine and concentrate all ComboBoxes together?  For example, I want to get all the values for the Date of the birth of three days of combo boxes, month and year.

    Can someone help me please?

    If you want your users to select date, month and year of your 3 comboboxes?  If so, you can use the following syntax and access the properties of the 3 comboboxes selectedLabel:

    Import fl.data.DataProvider;

    import flash.events.Event;

    var month is ["jan", "feb", "mar", "Apr", '' may '', "jun", "Jul", "aug", "sep", "oct", "nov", "December"];.

    var dp:DataProvider = new DataProvider (monthA);

    monthCB.dataProvider = dp;

    var dataA:Array = [];

    setDatesF (31);

    function setDatesF(n:int):void {}

    for (var i: int = 1; i<=n; i++)="">

    dataA.push (i);

    }

    DP = new DataProvider (dataA);

    dateCB.dataProvider = dp;

    }

    var yearA:Array = [];

    for (var i: int = 1900; I)<2100; i++)="">

    yearA.push (i);

    }

    DP = new DataProvider (year);

    yearCB.dataProvider = dp;

    monthCB.addEventListener (Event.CHANGE, monthF);

    function monthF(e:Event):void {}

    var d: Date = new Date (yearCB.selectedLabel, 1 + monthA.indexOf (monthCB.selectedLabel), 0);

    setDatesF (d.date);

    }

  • Fill ComboBox programmatically by a method

    I'm trying to populate a combobox in a method. However my drop-down list box is empty. Is there a way to update the dataProvider of the combobox?

    Here is my code,

    Thank you

    ---------------------------

    <? XML version = "1.0" encoding = "utf-8"? >
    < mx:Application
    ' xmlns:mx = ' http://www.Adobe.com/2006/MXML "
    styleName = "plain".
    Initialize = "init ()" >

    < mx:Script >
    <! [CDATA]

    Import mx.controls.Alert;
    Import mx.rpc.AsyncResponder;
    Import mx.collections.ArrayCollection;

    [Bindable]
    public var myArray:Array;

    private function init (): void
    {

    myArray.push ("one");
    myArray.push ("two");

    }
    []] >
    < / mx:Script >


    < mx:ComboBox id = "QueryComboBox" dataProvider = "{myArray}" / >

    < / mx:Application >

    You must use an ArrayCollection collection for the dataProvider:

    var myAC:ArrayCollection = new ArrayCollection (myArray);

    If this post answers your question or assistance, please mark it as such.

    Greg Lafrance - Flex 2 and 3 certified ACE

    www.ChikaraDev.com

    Flex / development, training, AIR and Support Services

  • Fill ComboBox data RemoteObject

    Hi all

    I try to use RemoteObject to populate a combobox. Here is my purpose and value mxml code...

    // Value Object Class: dataVO.as
    package com.mycomp
    {
         [RemoteClass(alias="datavO")]
         [Bindable]
         public class dataVO {
              public var data_id:int;
              public var data_name:String;
              public var data_type:String;
         }
    }
    
    // ActionScript code
    private
    function getAuthors(event:Event):void
    {
         // setup the remoteobject here

         serviceRO.getData.addEventListener(ResultEvent.RESULT, resultListener);
    }
    private function resultListener(event:Event):void
    {
         dgrid1.dataProvider = event.result as Array; // works perfectly
         combo1.dataProvider = event.result.data_name as Array; // displays empty combobox
    }

    <!-- MXML Code -->
    <mx:ComboBox id="combo1" /> <!-- I want to populate names here -->
    <mx:DataGrid id="dgrid1" />

    How should I do this?

    Thanks and greetings

    ShiVik

    Hello

    I faced this problem somewhere, all I remember is that the table of variables has been registered on the event.result [0].

    I don't really understand why, but it worked for me.

    Try event.result [0] .data_name

    Otherwise, you will need to run through the result manually and make your own table of data_name.

    Try to debug and see the structure of the result.

    Hope this helps,

    Salem

  • Fill ComboBox with HTTPService object

    I can't for the life of find me a good example of how call a doc by HTTPService xml, then use the data to populate a combobox control. Can someone help me with this please?

    Here's what I have so far.

    Part of the XML
    <? XML version = "1.0" encoding = "utf-8"? >
    < albumdirectory >
    < id album = details '1' = "Our trip home in 2005." >
    < title >
    Cottage 2005
    < /title >
    < safety pin = "" / > "
    < photos >
    < photo details = "" > assets/gallery/nature01_sm.jpg < / photo >
    < photo details = "" > assets/gallery/nature02_sm.jpg < / photo >
    < photo details = "" > assets/gallery/nature03_sm.jpg < / photo >
    < photo details = "" > assets/gallery/nature04_sm.jpg < / photo >
    < / photos >
    < / album >
    < / albumdirectory >

    Now, here's what I have so far for the flex code.

    < mx:HTTPService
    URL = "Assets/albums. XML ".
    ID = "albumXML".
    showBusyCursor = "true" / >

    < mx:ComboBox width = "100%" height = "8%" id = "albumBox" dataProvider = "{albumXML.lastResult.albumdirectory.album}" labelField = "title" > "

    < / mx:ComboBox >

    Any help on how I can get this fact would be great! Also good resources on "How-to" small snippets would be nice too.

    Thanks for your time

    OK sorry, it works. It was actually my xml that has been ruining things.

  • Fill ComboBox with an HTTPService object

    Hello
    I don'understant why it is not possible to get the Periodname of data field in my comboBox.
    Here is the XML returned by a php script

    < time >
    < period >
    HS summer < Periodname > < / Periodname >
    < debutPeriode > 2006 - 06 - 15 < / debutPeriode >
    < finPeriode > 2006 - 09 - 15 < / finPeriode >
    < / period >
    < period >
    < Periodname > fall < / Periodname >
    < debutPeriode > 2006 - 09 - 15 < / debutPeriode >
    < finPeriode > 2006 - 11 - 21 < / finPeriode >
    < / period >
    < / periods >

    and in my mxml file
    < mx:ComboBox = "183" x = "10" width = "120" id = "Cperiode" dataProvider = "{resperiode.lastResult.periodes.periode.nomPeriode}" > < / mx:ComboBox >

    I have this error:
    Error: Unknown property: 'Periodname '.

    If I remove Periodname I have a list of object in my combo.
    How can I get Periodname in the drop-down list?
    Sorry for my English
    Thank you for your answer

    Try changing the dataProvider and adding the labelField like this:

    The default value of comboBox for the labelField is "label", tell him that you use a different value, Periodname.

    Vygo

  • How to stop the re-fill combobox?

    Hello
    I have a combobox on frame 1 and it is also the Framework 2. When I go back the number of items in the combobox to frame2 frame1 duplicate. How can I stop this from happening?
    The code I have to populate the combobox control is:
    my2_cb. AddItem ({data: 1, label: "An object"});
    my2_cb. AddItem ({data: 2, label: "the second point"});

    Thank you
    Paul

    You may also void combobox before loading data in it with:

    Combo_instance. RemoveAll();

    See you soon,.
    Gorka
    www.AquiGorka.com

  • Rendering selected in the combobox element

    That may suggest the title!
    I am facing a problem rendering the selected item in the combobox ^^
    import javafx.application.Application;
    import static javafx.application.Application.launch;
    import javafx.beans.value.ChangeListener;
    import javafx.beans.value.ObservableValue;
    import javafx.collections.FXCollections;
    import javafx.collections.ObservableList;
    import javafx.scene.Group;
    import javafx.scene.Scene;
    import javafx.scene.control.ComboBox;
    import javafx.scene.control.ContentDisplay;
    import javafx.scene.control.ListCell;
    import javafx.scene.control.ListView;
    import javafx.scene.image.Image;
    import javafx.scene.image.ImageView;
    import javafx.scene.paint.Color;
    import javafx.stage.Stage;
    import javafx.util.Callback;
    
    /**
     *
     * @author Minedun6
     */
    public class CustomComboBox extends Application {
    
        @Override
        public void start(Stage primaryStage) {
            Group root = new Group();
            ComboBox box = new ComboBox();
            box.setPrefSize(150, 60);
            //ObservableList<String> data = FXCollections.observableArrayList("Google Chrome", "FireFox", "Safari", "Opera");
            //box.getItems().add(data);
            box.getItems().addAll(new Image("http://cdn1.iconfinder.com/data/icons/fs-icons-ubuntu-by-franksouza-/32/google-chrome.png"),
                    new Image("http://cdn1.iconfinder.com/data/icons/humano2/32x32/apps/firefox-icon.png"),
                    new Image("http://cdn1.iconfinder.com/data/icons/fatcow/32x32/safari_browser.png"),
                    new Image("http://cdn1.iconfinder.com/data/icons/fatcow/32/opera.png"));
            box.setCellFactory(new Callback<ListView<Image>,ListCell<Image>>(){
                @Override
                public ListCell<Image> call(ListView<Image> p) {
                    //throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
                return new ListCell<Image>(){
                 private final ImageView view;
                 { 
                            setContentDisplay(ContentDisplay.GRAPHIC_ONLY); 
                            view = new ImageView();
                        }
                 @Override
                 protected void updateItem(Image item, boolean empty) {
                            super.updateItem(item, empty);
                            
                            if (item == null || empty) {
                                setGraphic(null);
                            } else {
                                view.setImage(item);
                                setGraphic(view);
                            }
                       }
                };
                
                }   
            });
            
            
            box.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Image>(){
    
                @Override
                public void changed(ObservableValue<? extends Image> ov, Image t, Image t1) {
                    
                }
            });
            
            
            Scene scene = new Scene(root, 300, 250);
            root.getChildren().addAll(box);
            primaryStage.setTitle("Hello World!");
            primaryStage.setScene(scene);
            primaryStage.show();
        }
    
        /**
         * The main() method is ignored in correctly deployed JavaFX application.
         * main() serves only as fallback in case the application can not be
         * launched through deployment artifacts, e.g., in IDEs with limited FX
         * support. NetBeans ignores main().
         *
         * @param args the command line arguments
         */
        public static void main(String[] args) {
            launch(args);
        }
    }
    so when the context menu is displayed, the images display correctly, but when I select the image, it does not, it shows me the following "javafx.scene.image.Image".
    Another thing is for each image I want to display a text!
    If I can get it work, I'll post a thread indicating how to fill combobox with images, text of the database ^^
    Hopefully I can find useful assistance once again ^^
    In addition, thx D of James ^^

    Define a class to wrap the name of the browser and its icon:

    Browser.Java

    import javafx.scene.image.Image ;
    public class Browser {
      private final String name ;
      private final Image icon ;
      public Browser(String name, Image icon) {
        this.name = name ;
        this.icon = icon ;
      }
      public Image getIcon() {
        return icon ;
      }
      public String getName() {
        return name ;
      }
      @Override
      public String toString() {
        return name ;
      }
    }
    

    Now you can do:

    import javafx.application.Application;
    import static javafx.application.Application.launch;
    import javafx.beans.value.ChangeListener;
    import javafx.beans.value.ObservableValue;
    import javafx.collections.FXCollections;
    import javafx.collections.ObservableList;
    import javafx.scene.Group;
    import javafx.scene.Scene;
    import javafx.scene.control.ComboBox;
    import javafx.scene.control.ContentDisplay;
    import javafx.scene.control.ListCell;
    import javafx.scene.control.ListView;
    import javafx.scene.image.Image;
    import javafx.scene.image.ImageView;
    import javafx.scene.paint.Color;
    import javafx.stage.Stage;
    import javafx.util.Callback;
    
    /**
     *
     * @author Minedun6
     */
    public class CustomComboBox extends Application {
    
        @Override
        public void start(Stage primaryStage) {
            Group root = new Group();
            ComboBox box = new ComboBox();
            box.setPrefSize(150, 60);
            //ObservableList data = FXCollections.observableArrayList("Google Chrome", "FireFox", "Safari", "Opera");
            //box.getItems().add(data);
            box.getItems().addAll(new Browser( "Chrome", new Image("http://cdn1.iconfinder.com/data/icons/fs-icons-ubuntu-by-franksouza-/32/google-chrome.png")),
                    new Browser("Firefox", new Image("http://cdn1.iconfinder.com/data/icons/humano2/32x32/apps/firefox-icon.png")),
                    new Browser("Safari", new Image("http://cdn1.iconfinder.com/data/icons/fatcow/32x32/safari_browser.png")),
                    new Browser("Opera", new Image("http://cdn1.iconfinder.com/data/icons/fatcow/32/opera.png")));
            box.setCellFactory(new Callback,ListCell>(){
                @Override
                public ListCell call(ListView p) {
                    //throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
                return new ListCell(){
                 private final ImageView view;
                 {
                           //  setContentDisplay(ContentDisplay.GRAPHIC_ONLY);
                            view = new ImageView();
                        }
                 @Override
                 protected void updateItem(Browser item, boolean empty) {
                            super.updateItem(item, empty);
    
                            if (item == null || empty) {
                                setGraphic(null);
                                setText(null);
                            } else {
                                view.setImage(item.getIcon());
                                setGraphic(view);
                                setText(item.getName());
                            }
                       }
                };
    
                }
            });
    
            box.getSelectionModel().selectedItemProperty().addListener(new ChangeListener(){
    
                @Override
                public void changed(ObservableValue ov, Browser t, Browser t1) {
                    String browserName = t1.getName();
                    Image browserIcon = t1.getIcon();
                    // do whatever you need with the browserName and icon...
                }
            });
    
            Scene scene = new Scene(root, 300, 250);
            root.getChildren().addAll(box);
            primaryStage.setTitle("Hello World!");
            primaryStage.setScene(scene);
            primaryStage.show();
        }
    
        /**
         * The main() method is ignored in correctly deployed JavaFX application.
         * main() serves only as fallback in case the application can not be
         * launched through deployment artifacts, e.g., in IDEs with limited FX
         * support. NetBeans ignores main().
         *
         * @param args the command line arguments
         */
        public static void main(String[] args) {
            launch(args);
        }
    }
    

    You can of course add more fields to your class of browser if you need. You can also consider getting browser an enum [url http://docs.oracle.com/javase/tutorial/java/javaOO/enum.html].

Maybe you are looking for

  • I lost Firefox off my Computer - no other way to access the internet. How I install it again?

    In the process of pulling up a printer driver which again because my computer won't talk to my printer, I disconnected the e-mail and when I went to get on the internet, yet once he will not otherwise firefox. No other way to get on the internet so i

  • Sorensen XEL power is compatible with labview

    What Sorensen XEL power compatible with labview? I'm in the automotive field of vehicle dashboard. I want to test and simulate different transient conditions that may generate noise in the pipe I needed of a programmable power supply. Currently I hav

  • Sensitivity of setting for WVC54GCA

    I have the camera set to detect movement and send me an email if it is triggered. I get a lot of unnecessary e-mails because the sensitivity is too high. I can't get the installer to allow me to adjust the sensitivity levels. When I click on the butt

  • Windows Update, I tried everything

    INTRO: I have a PROBLEM of Windows Update 7/8!  Been using the internet on this pc for years, it is a problem of update.  Not a simple question and fix.  I know because I tried all forums, all the comments, all positions, and each miracle of Microsof

  • How can I change the window color

    Hello, I use Windows 7 Ultimate where in I am not able to change the color of the window. whenever I click on it, it displays the "windows color and appearance". Please tell me how can I change the color of my window? My PC has 2 GB of RAM, 2.67 GHz