How do I get the tag of a selected line in a tree control ?

I am running LabVIEW 7.1.
I want to be able to add a parent or sibling to a tree to a selected item in a tree.

The tag of the selected item is actually the output of the tree control itself. If you create an indicator from the tree control, you will get a duplicate tree control (indicator), but if you wire the output into a string indicator, the tag of the selected item will show up. You can an item to the tree by wiring the tree reference into an invoke node, calling the method "Edit Tree Items: Add Item", and wiring the output of the tree control (which will be the tag of the selected item) into the "Parent Tag" terminal. This method will only let you add a child to an item, you cannot add a parent or sibling. Items cannot have multiple parents, so it wouldn't make sense to add a parent; and to add a sibling for the selected item, you could call the method "Navigate Tree: Get Parent" and pass the tag of the parent into the "Edit Tree Items: Add Item" method.
Robert Mortensen
Software Engineer
National Instruments

Similar Messages

  • How do you get the value of a selected list item?

    I have a drop-down list that the user can choose from. How do I get the value of what they selected? I thought I could do this by using the NAME_IN function, but I'm getting FRM-40105 Unable to resolve reference to item X. I don't know what I'm doing wrong.
    Thanks!

    Hi,
    You can use an WHEN-LIST-CHANGED trigger, attached to the list-item itself. And, in this trigger, you can use the name of the item to refer its value.
    For example:
    :block_name.list_item_name
    John

  • How to read/get the document attached to PO line item

    Hi experts,
    I got a requirement wherein I need to read/get the document attached at PO line item and to send that document through mail as an attacment .
    please suggest me how to proceed on this.

    actually your are picking up the correct data from Table EKET (EKET-EINDT) but your are printing that in item data loop for EKET might have already executed in your script and the header of that internal table consist the last entry of the table so for that. Fetch the delivery date explicite from the Table EKET when your in item level processing and print that.
    For Example u can use this code.
    To print you have write the this code in Script item level printing window "MAIN" window
    Following perform is called to get the line item delivery date in PO
    {/: PERFORM GET_DEL_DATE IN PROGRAM ZPerform_prog
    /: USING &EKPO-EBELN&
    /: USING &EKPO-EBELP&
    /: CHANGING &DEL_DATE&
    /: ENDPERFORM}
    {* Dellivery date &DEL_DATE& }
    write the below code in the Z program "ZPerform_prog"
    { FORM get_del_date  TABLES in_par STRUCTURE itcsy
                             out_par STRUCTURE itcsy.
      READ TABLE in_par WITH KEY 'EKPO-EBELN'.
      CHECK sy-subrc = 0.
      $_po_no = in_par-value.
      READ TABLE in_par WITH KEY 'EKPO-EBELP'.
      CHECK sy-subrc = 0.
      $_po_line = in_par-value.
      SELECT *
      FROM eket UP TO 1 ROWS WHERE ebeln EQ $_po_no AND ebelp EQ $_po_line.
        $_del_date = eket-eindt.
        CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'
          EXPORTING
            date_internal            = eket-eindt
          IMPORTING
            date_external            = $_del_date
          EXCEPTIONS
            date_internal_is_invalid = 1
            OTHERS                   = 2.
        READ TABLE out_par WITH KEY 'DEL_DATE'.
        CHECK sy-subrc EQ 0.
        out_par-value = $_del_date.
        MODIFY out_par
                    INDEX sy-tabix.
        CLEAR : $_po_no , $_po_line ,$_del_date.
      ENDSELECT.
    ENDFORM.                    "GET_DEL_DATE }

  • How do I get the values from a selected row.

    I am using JDeveloper 9.0.5. On my page, I have placed a button within a table. The button has been assigned an event. The event is within my Action class. This class implements DataAction and has overriden the
    processComponentEvents(DataActionContext actionContext);
    method.
    Question: While I am within the processComponentEvents method, is it possible to obtain the values of selected row?

    Good Morning Jeffery,
    First off thanks for your clear explanation. I have a few related questions as noted from your response:
    There are two ways to communicate the desired model row between the UIX view and the struts controller. One way is to use the singleSelection component in your table and put your buttons in the singleSelection's contents.
    When the user selects the radio button for a particular row and then clicks on one the buttons, a built in event handler in UIX will set the current row in the model to be the user selected row. Therefore, your Struts action can operate on the currently selected model row.
    When you drop a UIX table from the data control palette it is automatically set up in this way (with a single selection).
    Ok, Lets say that i've set everything up as you described. Not lets say that the button was pressed and I hit the overriddenprotected void processComponentEvents(DataActionContext actionContext) throws IOException, ServletException ;
    When I look at the request object, I do not see the values. How do I get access to the rowkey at this point?
    Some people, however, want to actually render buttons in their table rows, and have those buttons initiate an action on their row. If you are doing this, then you need to pass the row id to your struts action as a parameter, which means that you need to know the row id when you are rendering a button for a given row. There is an EL expression that will return the row-id for the current row, it is:
    ${uix.current.rowKeyStr}
    which is not so obvious or well documented in the preview release (sorry) but should be for the production release.
    A generic code snippet would go a long way to shedding some light on that. I guess I am use to using JDeveloper 9.0.3. It seems,"to me", that JDev 9.0.5 has put a completely new twist on things. I find myself wondering when I can use the 9.0.3 syntax and when
    should not. If your team has any short source toys around which demonstrated using rowkeys, or accessing the internal parts of the
    struts controller, I would find that invaluable. It dose not matter if this information is documented.
    Thank you

  • ListView + MVVM: How do I get the value of a selected cell?

    Hi,
    I love programming WPF using MVVM, but sometimes easy looking problems lead to unbearable suffering.
    Here is my problem: I have a simple list view with about a couple of columns. All I want to do is to copy the cell content to clipboard, when the user right-clicks on a cell.
    <ListView Grid.Row="0" ItemsSource="{Binding Articles}" SelectedItem="{Binding SelectedArticle}" SelectionMode="Single">
    <ListView.View>
    <GridView>
    <GridView.Columns>
    <GridViewColumn Header="ID" Width="70" DisplayMemberBinding="{Binding Path=ID, Mode=OneWay}" />
    <GridViewColumn Header="Name" Width="150" DisplayMemberBinding="{Binding Path=Name, Mode=OneWay}"/>
    <GridViewColumn Header="Price" Width="100" DisplayMemberBinding="{Binding Path=Price, Mode=OneWay}"/>
    <GridViewColumn Header="Description" Width="70" DisplayMemberBinding="{Binding Path=Description, Mode=OneWay}"/>
    </GridView.Columns>
    </GridView>
    </ListView.View>
    </ListView>
    Without MVVM I probably would have used the some Click-Event and extract the info from the event args. But of course I don't want to break the MVVM pattern.
    But if I use some kind of event binding I cannot find a way to retrieve event args or the sender object:
    <i:EventTrigger EventName="PreviewMouseRightButtonDown">
    <i:InvokeCommandAction Command="{Binding CopyCellValueToClipCommand}"/>
    </i:EventTrigger>
    Using this trigger I can react to the desired event, but how can I retrieve the cell value?
    I really hope you guys have a clue.
    Thanks for your help,
    Michael

    I'm not so sure about listview, I rarely use them for more complicated requirements.
    I would use a datagrid.
    You can bind a cellinfo:
    http://stackoverflow.com/questions/20080130/how-to-bind-currentcell-in-wpf-datagrid-using-mvvm-pattern
    <DataGrid AutoGenerateColumns="True"
    SelectionUnit="Cell"
    SelectionMode="Single"
    Height="250" Width="525"
    ItemsSource="{Binding Results}"
    CurrentCell="{Binding CellInfo, Mode=OneWayToSource}"/>
    and
    private DataGridCellInfo _cellInfo;
    public DataGridCellInfo CellInfo
    get { return _cellInfo; }
    set
    _cellInfo = value;
    OnPropertyChanged("CellInfo");
    MessageBox.Show(string.Format("Column: {0}",
    _cellInfo.Column.DisplayIndex != null ? _cellInfo.Column.DisplayIndex.ToString() : "Index out of range!"));
    You can use index and bind selecteditem or get contents of cell:
    public DataGridCell GetDataGridCell(DataGridCellInfo cellInfo)
    var cellContent = cellInfo.Column.GetCellContent(cellInfo.Item);
    if (cellContent != null)
    return (DataGridCell) cellContent.Parent;
    return null;
    Hope that helps.
    Recent Technet articles:
    Property List Editing ;  
    Dynamic XAML

  • How can I get the CFL of PO Detail Line?

    Hi,Expert
    The issue is as the Title.
    Apperciate any valuable suggestion.
    Regards
    Eric Wang

    I explain it in detail .I want to get the PO line data by creating the CFL.
    The c# code as follows:
            private void AddChooseFromList() {
                try
                    SAPbouiCOM.ChooseFromListCollection oCFLs = null;
                    SAPbouiCOM.Conditions oCons = null;
                    SAPbouiCOM.Condition oCon = null;
                    oCFLs = oForm.ChooseFromLists;
                    SAPbouiCOM.ChooseFromList oCFL = null;
                    SAPbouiCOM.ChooseFromListCreationParams oCFLCreationParams = null;
                    oCFLCreationParams = ( ( SAPbouiCOM.ChooseFromListCreationParams )( SBO_Application.CreateObject( SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams ) ) );
                    //  Adding 2 CFL, one for the button and one for the edit text.
                    oCFLCreationParams.MultiSelection = false;
                    oCFLCreationParams.ObjectType = "22";
    //{color:red}How can I directly get the PO detialline objectType  or in other way?{color}
                    oCFLCreationParams.UniqueID = "CFL1";
                    oCFL = oCFLs.Add( oCFLCreationParams );
                    //  Adding Conditions to CFL1
                    oCons = oCFL.GetConditions();
                    oCon = oCons.Add();
                    oCon.BracketOpenNum = 2;
                    oCon.Alias = "docstatus";
                    oCon.Operation = SAPbouiCOM.BoConditionOperation.co_GRATER_EQUAL;
                    oCon.CondVal = "O";
                    oCon.BracketCloseNum = 1;
                    oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_AND;
                    oCon = oCons.Add();
                    oCon.BracketOpenNum = 1;
                    oCon.Alias = "cardcode";
                    oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;
                    oCon.CondVal = "scguan";
                    oCon.BracketCloseNum = 2;
                    oCFL.SetConditions( oCons );
                    oCFLCreationParams.UniqueID = "CFL2";
                    oCFL = oCFLs.Add( oCFLCreationParams );
                catch (Exception ex)

  • How can I get the tab key to select text fields only?

    Since upgrading to Firefox 4 on Windows, the tab key functions differently. How do I change it so that it only selects text input fields?

    The answer is:  The bug is in the UI.  Speech recognition was enabled, by default it uses the bare escape key as a "mic on" indicator, and it does not leave any trace in the keybord configuration.  So that is the bug.  It needs to leave a trace there, a la: "X Listen-for-voice-command  ^" under Mission Control.

  • How can I get the coordinates to draw a line?

    Hi,
    I want to draw a line. Here is a part of my Quell-code.
    public class Map extends JFrame {
    public Map() {
    super("Map");
    setSize(340, 340);
    MapPane map = new MapPane();
    getContentPane().add(map);
    class MapPane extends JPanel {
    public void paintComponent(Graphics comp) {
    Graphics2D comp2D = (Graphics2D)comp;
    comp2D.drawLine(0,0,340,340);
    Now, the line begins exactly top left in the edge, but ends not exactly down right in the edge of my Frame. Is there any possibility to determine the exact coordinates of the frame. I thought, if the size of the window is set by the setSize-Method to (340,340), the line ends exact
    in the edge (down right). See: comp2D.drawLine(0,0,340,340).
    Can somebody give me a piece of advice, please?
    Thanks, joletaxi

    Have you tried the getWidth() and getHeoght() methods to determine how long the line should be?

  • Shell script: How can i get the parameters of a command line?

    Im a newbie. Help please!
    For example my mini script test.sh
    #!/bin/bash
    echo all parameters: $*and now i run some test:
    $ ./test.sh aa bb cc
    all parameters: aa bb ccok!
    $ ./test.sh aa bb $cc
    all parameters: aa bbwhere is here $cc ?
    $ ./test.sh aa $bb cc
    all parameters: aa ccwhere is $bb ?
    My question: How can i become 'aa $bb cc'? But without using of \  or ' or "  like this:
    ./test.sh aa \$bb cc
    or
    ./test.sh 'aa $bb cc'Many thanks!

    This is exactly what i want! Why not?
    It is possible to run a Linux command or bash script from SQLPlus.
    It begin with "!" and the script can have parameter too!
    You can say:
    SQL>!ls
    SQL> !ls -l /u01/app
    It is possible, also i do it!
    My script should have following functions:
    - take the SQL statement from SQLPlus as paraameter,
    - execute the SQL
    - spool the result to a temp file.
    - format the select result: elimnate unwanted the column spacing
    - present again in SQLPlus
    It look like this:
    SQL>!do_select_format select * from v$logfile;do_select_format is the name of my script!
    and i see somthing like this:
    GROUP# STATUS TYPE   MEMBER                                     IS_
    ====== ====== ====== ========================================== ===
    3             ONLINE +DATA/orcl/onlinelog/group_3.266.780357305 NO 
    3             ONLINE +DATA/orcl/onlinelog/group_3.267.780357305 YES
    2             ONLINE +DATA/orcl/onlinelog/group_2.264.780357303 NO 
    2             ONLINE +DATA/orcl/onlinelog/group_2.265.780357303 YES
    1             ONLINE +DATA/orcl/onlinelog/group_1.262.780357301 NO 
    1             ONLINE +DATA/orcl/onlinelog/group_1.263.780357303 YES
    6 rows,  5 columns found!Note: i dont want to say: col format xxxx xxx ... before!
    Edited by: DBA(t home) on May 8, 2012 4:44 AM
    Edited by: DBA(t home) on May 8, 2012 4:46 AM

  • How to get the tag name of HTMLDocument?

    I am now using JEditorPane to display and edit a html file.
    My code is like this:
    kit = new HTMLEditorKit();
    doc = (HTMLDocument) (kit.createDefaultDocument());
    editor.setEditorKit(kit);
    editor.setDocument(doc);
    editor.setContentType("text/html; charset=utf-8");
    editor.getDocument();
    [editor is the class JEditorPane,  doc is HTMLDocument,  kit is HTMLEditorKit]
    When a user clicks on the pane, it's easy to me to get the caret position. However, how can I get the tag?
    For example,
    <p><font class="book">I am a boy.</font> Hello! </p>
    On the pane, the position between "I am a boy" is clicked, I want to get the name of the tag - "font". Moreover, how can I get the class - "book" also?
    Moreover, can I get the <p> tag also?
    Many Thanks!
    Stephen

    Hi Stephen,
    is it possible to get the EditorKit from the EditorPane and then get the ViewFactory for the editor kit.
    Since u have the some tags of the elements hardcoded in the HTMLEditorKit.HTMLFactory it will be handy i guess.
    Let me know whether it helped or not so that either same method be approached or some other has to be tried.
    Cheers,
    Nagaraj

  • How can I get a drop-down list selection also be selected in another field with the same list but a different name?

    I have a street address and a billing address. A question is posed with a checkbox — "Is the billing address the same as the street address?" If Yes is checked, the street address automatically fills the billing fields. If No is checked, the user must fill in new information. In both the street address and billing addres, the State field is a drop-down list. How can I get the drop-down list selection in the street address State also be selected in drop-down list for the billing address State?

    Has anyone done this?

  • How to get the position of a selected cell in a table ?

    Hi,
    How can I get the position of a selected cell in a table or in a list multicolumn cmd ?
    Thanks.

    Invoke node >>> point to Row Column
    Ben
    Message Edited by Ben on 07-19-2007 03:14 PM
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Attachments:
    Point_To_Row_Column.PNG ‏22 KB

  • How to get access to Row Data (Child Text) in a Tree Control Pragmatically?

    In LabVIEW 2010, I have entered Row Data into a Tree Control pragmatically using the Add Item method and providing the Child Text array and the Child Tag for the Row. When a Row in the Tree Control is selected, I can get the Row Tag in the Value Property of the Tree. But how do I access the Child Text array data when the Row is selected? I can't seem to find a Tree Control Property or Method that will return that data back again.
    What I am trying to do is: once a Row in a Tree is selected and a button is pushed, if the Row Tag is valid, I want to transfer all of the Row data into another similarly formatted Tree. To do that I need the Row Data for the Tree and Row that was selected. I can not find a way to get access to this Row Data after it has been entered into the Tree.
    Can anyone tell me how to pragmatically access the Child Text or Row Data in a Tree Control from a selected Row in the Tree? I have the Tag for the Row, but how do I access the data?
    Thanks for your assistance.
    Solved!
    Go to Solution.

    As mentioned in the posting here, you can use the Active Item:Tag property to set the item to which subsequent property changes apply. This includes pulling the Active Celltring values out in a for loop as you increment the Active Cell:Active Column Number to get the row's Child Text data programmatically as I was originally wanting to do.
    Note that wiring a 0 to the ActiveColNum property and reading the String value will return the tree item's visible name (in column 0), but not the unique item Tag (which is somewhat intangible after its creation). Therefore, I save the unique item tag when I add the item to the tree control (the output of the Add Item invoke node) and store it as a separate column of the Child Text array and place it out of sight in the tree control so I have access to it later. It might be useful, it might not.
    I find the tree control totally non-intuitive and not well explained anywhere, but that's how a lot of LabVIEW coding is I guess. Play with it long enough and you become an expert. I had to learn the hard way, but I hope this helps someone else.
    -Richard
    "Computers are useless. They can only give you answers." - Pablo Picasso

  • I have imported an mp3 to my Library.  I want to keep it as media kind = podcast but no matter how often I change the tag in get info options media kind, the change will not persist.

    I have imported an mp3 to my Library.  I want to keep it as media kind = podcast but no matter how often I change the tag in get info > options > media kind, the change will not persist, and the file remains in my Music list not my Podcast list.

    Resolved in update.

  • How to get the tag name into javascript

    Hi,
    Is there any way to get the tag name into java script when user clicks on.
    For eg: if i use netui:anchor tag, how can I pass the tag id to the javascript when user clicks on the link using onClick attribute. This tag id needs to be evaluated at run time.
    Ex code is given below.
    function fun1(){
    // how to get the tag name;
    <%
    String st="hai";
    %>
    <netui:anchor action="x" onClick="fun1()" tagId="<%=st%>>
    I want to get this tagId (st) to the java script function fun1() when user clicks on this link. How can I do that. can you please help in this issue.
    Thanks,
    Satish.

    Hi,
    You can set the java variable as a js variable at run time:
    <script>
    var anchorName = <%=getNetuiTagName%>;
    function fun1()
    var anchorID = getNetuiTagName(anchorName);
    alert(anchorID);// this will show the rendered ID for the anchor specified
    </script>
    this works because the jsp variable will be rendered before the js.
    Thanks,
    Steve

Maybe you are looking for