Problem encountere​d in inserting tree items

Hello All.
I am encountering problem in inserting tree items in a parent child recurring manner. My requirement is that everytime i presses the button, one parent should be inserted in the tree along with its child. Its output should be just like
Fault Code: 7400
Fault Code: 7400
Fault Code: 7401
Fault Code: 7401
and so on.
I am not getting the desired output. What should be way of doing this. Please find the attached project too.
Regards.
Solved!
Go to Solution.
Attachments:
Tree Problem.zip ‏1128 KB

I have no CVI on this machine to run your project, but in a fast look at the code I noticed that you are always using 0 as the item index. You mustr save the index of the parent item and use it for the childs instead:
  idx = InsertTreeItem (panelHandle, PANEL_TREE, VAL_SIBLING, 0,     VAL_LAST,temp_buffer, "",0, -1);
  InsertTreeItem (panelHandle, PANEL_TREE, VAL_CHILD, idx,         VAL_LAST,temp_buffer, "",0, -1);
but I don't understand what the child means: the code above will produce the following output ( + here mimics the tree symbols):
Fault code: 7400
 + Fault code: 7400
Fault code: 7401
 + Fault code: 7401
Proud to use LW/CVI from 3.1 on.
My contributions to the Developer Zone Community
If I have helped you, why not giving me a kudos?

Similar Messages

  • How to insert more items for each tab in WAD  7.0

    Hello to everyone,
    My problem is confined to the WAD 7.0
    I would like to insert 4 different queries into a new Web Template.
    Two of them have to stay in one page and the others in one page each; therefore, the result would be a Web Template with three tabs.
    Unfortunately the system creates automatically four different tabs with one query each.
    Anybody knows how to insert more items in one page/tab?
    Thank you very much
    Savino Pompa

    Hi Savino
    In the WAD bring up the properites of the tabstrip_container web item, under the Internal Display group in the Tab Panel List, create 3 tabs, then drag 3 contatiner_layout web items into the tab web item.
    In each conatiner item drag the analysis web item, 2 in the first container, then 1 each for the others, then point each analysis web item at a dataprovider(query).
    Setup the contatiners so that the analysis items displays, to do this in the container properties create a row then on the following screen a column and then set the Subordinate web item to the analysis item, these web items control layout and are useful for dealing with multiple web items, for the first tab with 2 queries you will need to play with the layout, either 1 row 2 column or 2 row 1 column.
    For each tab you created add the corresponding contatiner as the Subordinate Web Item in the Tab Panel parameters for each tab.
    Hope this helps
    Josh

  • Using Javascript to prevent a tab or tree item from navigating?

    Hello there,
    I have been trying to implement the functionality across my forms that if a user has entered data but attempts to navigate away by clicking on another tab or item in a tree list they are notified that they have not clicked submit and they will ose there changes.
    Using the help from: Re: detecting changes to items prior to submitting page I managed to get this working, so that if they (the user) have edited any items, an alert displays "Data has been changed. Continue anyway?", with the options OK and Cancel. However even if the user clicks cancel, the page will still navigate away losing the changes.
    In the provided link from the other thread, 'grahamr' appears to have provided the solution for this but later removed this code as he couldnt get it to display properly in the forums.
    Is there anyone else who might know how I can get the javascript to "block" navigation if the user selects cancel?
    Thankyou for any insight anyone can provide,
    Jordan

    Hmm,
    I had a look at your example application on the supplied link, however I cannot find any instructions or steps on how to go about implementing this method.
    Using my current method (from the thread linked in the first post of this thread) I have no problem getting the javascript to recognise changes and prompt the user on trying to leave - it's just that the href continues regardless of the user clicking cancel (wish grahamr managed to resolve somehow). Do you know why this might be?
    My javascript (2 posts above) is fired within the Anchor tag of my tabs and tree items like so; (Im only using [ ] brackets here so that it will display in the forum)
    [a onclick="javascript:checkForChangedData();" href="#TAB_LINK#" ][font color="#FFFFFF"]#TAB_LABEL#[font][a]
    Or if possible is there any assistance you could provide for implementing the method in your sample application? (I dowloaded the app but that page was not in it)
    Any help you can provide is greatly appreciated,
    Jordan

  • Flex SDK 3.4 Tree Item Renderer Root Folder displays Tooltip for Child

    I have a Flex Tree that uses a custom item renderer.  The item renderer extends Tree Item Renderer and I add my button in commit properties (since the data is dynamic) and I use update displaylist to move it to the right position.  I set the button to be visible on rollover and make the icon invisible. On rollout I reverse that logic.
    When I have my item renderer add the button, it causes only one problem and it seems to be under certain conditions:
    - Single root folder for the tree
    - Upon opening the tree, the root folder displays the tool tip for the last child in the tree
    Any idea why the tooltip comes up?
    public function AssetTreeItemRenderer ()
                super();
                addEventListener(MouseEvent.ROLL_OVER, onItemRollover);
                addEventListener(MouseEvent.ROLL_OUT, onItemRollout);
                addEventListener(ToolTipEvent.TOOL_TIP_SHOWN, toolTipShown);
                addEventListener(ToolTipEvent.TOOL_TIP_CREATE, onCreateToolTip);
            // OVERRIDEN FUNCTIONS
             * override createChildren
            override protected function commitProperties():void {
                super.commitProperties();
                if(data is IAsset) {
                    if(playBtn === null) {
                        playBtn = new Button();
                        playBtn.styleName = "previewPlayButton";
                        playBtn.toolTip = "Play";
                        playBtn.width = icon.width + 2;
                        playBtn.height = icon.height + 2;
                        playBtn.visible = false;
                        playBtn.addEventListener(MouseEvent.CLICK, onPlayBtnClick);
                        addChild(playBtn);
                } else {
                    if(playBtn !== null) {
                        removeChild(playBtn);
                        playBtn = null;
             * override updateDisplayList
             * @param Number unscaledWidth
             * @param Number unscaledHeight
            override protected function updateDisplayList(unscaledWidth:Number,
                                                          unscaledHeight:Number):void
                super.updateDisplayList(unscaledWidth, unscaledHeight);
                //Move our play button to the correct place
                if(super.data && playBtn !== null)
                    playBtn.x = icon.x;
                    playBtn.y = icon.y;

    You are not clearing tooltip if data is not IAsset

  • Hierarchical tree item - how to improve performance

    I'm loading hierarchical tree item with query.
    Problem is that it takes very long to load all the items(300, but can be more) to the hierarchical item.
    Query takes 0.5 sec., but loading it into the item with Set_Tree_Property(htree, Ftree.RECORD_GROUP
    the code:
    PL1 := Create_Group_From_Query('pl1', query);
    v_ignore := Populate_Group(PL1); -- 0.5 sec
    Ftree.Set_Tree_Property(htree, Ftree.RECORD_GROUP, PL1); -- 3 sec.
    Does anyone have any idea what to do to improve tree loading?

    Hello,
    try to play a little bit with the state-column of your query. If you only display the first hierarchy level
    and set the state of the "hidden" nodes to open, I think ist is the state 1, then it works much faster.
    cu
    Matthias M|ller

  • How to highlight tree item ?

    Hello everybody !
    I have a question : how to highlight a tree item on a condition ? (please see the attached vi and the pictures for a clearer explanation of the problem)
    I am using LabView 2014.
    Thank you very much !
    Solved!
    Go to Solution.
    Attachments:
    Highlight_tree_item.vi ‏13 KB

    Have patience.  You only aske the question about 40 minutes earlier.
    You highlight rows like you want by writing values to the tree control.  Don't mess with cell background color.
    Are you trying to highlight multiple items?  If so, then right click on the control and allow it to select 0 or more items.  As soon as you select a mode with the possibility of more than one item, the tree values become an array of strings rather than just a string.  You will need to build an array of strings that you will write to the control's local variable to highlight the multiple items.

  • Error Message: "Unable to insert an item."

    Hello!
    We have couple of programmers working together. One nice day, after getting another version from co-programmer, I am getting constantly error message "Unable to insert an item." The error will come ALWAYS after RUNNING the project. As long as I will not RUN (or not DEBUG) the project, all is fine and I can do everything. But after running the project almost every action I'm going to do ends with error "Unable to insert ...". Has anybody before seen such a error? Any suggestions?
    With best regards,
    Raul

    Raul --
    This was a known bug in JDeveloper 3.1. It has been fixed for JDeveloper 3.2. In the meantime, some suggested work arounds are:
    1. Reinstall JDeveloper (problem apparently is likely to reappear after a while).
    2. Rebuild your workspace, and re-add the projects to it.
    3. Compile individual files rather than the entire project at once.
    -- Brian
    null

  • Why does DW disable insert menu items?

    This must be a configuration option someplace, but in general, why would DW disable Insert menu items?
    I am in .cfm file, in clearly an unlocked area of a page where I should be allowed to insert hyper links, email links, horizontal rules, images, tables.  But on the Insert menu, each of those items is disabled (and others, but you get the point).  Since the insert menu items are disabled, the keystroke shortcuts for those actions don't function.
    I can manually type in these tags, and I can insert them from the Insert window.
    I start a brand new .cfm page, and the insert menu is fine.
    It appears DW is examining the code and deciding [INCORRECTLY] what is appropriate to insert via the menu.
    Thanks for any insight provided.

    > Dreamweaver is putting the PHP href code (<a
    href="../st_vimmel.php"> code
    > </a>) not me?
    That's plain HTML, not PHP, and DW doesn't do that - really.
    > Can Flash also fix the <embed> tag (take away) as
    the W3C HTML validator
    > don't
    > accept this tag?
    DW's javascript solves that problem.
    > I fixed the problem flash image with a workarround code
    for the moment:
    *DON'T DO THAT*
    Leave DW's code alone.
    > To get away from all the javascript and other code that
    could be the
    > problem.
    It is not the problem, most likely - but tell us what the
    problem was.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Magooi" <[email protected]> wrote in
    message
    news:edie10$529$[email protected]..
    > Dreamweaver is putting the PHP href code (<a
    href="../st_vimmel.php"> code
    > </a>) not me?
    >
    > Hmm, where do I put the href i Flash?
    >
    > Can Flash also fix the <embed> tag (take away) as
    the W3C HTML validator
    > don't
    > accept this tag?
    >
    > I fixed the problem flash image with a workarround code
    for the moment:
    >
    >
    quote:
    <object type="application/x-shockwave-flash"
    > data="/images/banners/25000.swf" width="438"
    height="280">
    > <param name="movie"
    value="/images/banners/25000.swf">
    > <param name="quality" value="high">
    > </object>
    >
    > To get away from all the javascript and other code that
    could be the
    > problem.
    > My side is a bit complex with PHP/MySQL and many
    javascripts so I think
    > there
    > was a conflict with my admin system using MySQL or
    something.
    >

  • Insert Menu Item with underscore

    When I insert menu items that have underscores it underlines the previous letter rather than showing underscore. How do I fix this problem?

    Are you trying to get a menu item to be selected by an Alt key combination? Placing an underscore "_", before any letter in the Item Name will cause an underscore to appear under the subsequent letter (not previous) and allow Alt + the underscored letter to active that menu item. For example, J_unk will appear as Junk with an underscore under u and ALT + u will activate the Junk menu.

  • How to get a tree item when my mouse moves

    I want to get the tree item which my cursor points to when my
    cursor moves over a tree.
    I can get a row index in itemRollOver event, but it seems
    useless.
    And I don't know how to use getObjectsUnderPoint method.
    Is there anyone who can help me?

    Take a look this example:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    creationComplete="srv.send()">
    <mx:Script>
    <![CDATA[
    [Bindable]
    public var selectedNode:Object;
    [Bindable]
    public var XLC:XML;
    public function initList(event:Event) : void
    XLC = event.target.lastResult;
    public function treeChanged(event:Event) : void
    selectedNode=Tree(event.target).selectedItem;
    ]]>
    </mx:Script>
    <mx:HTTPService id="srv" url="../assets/tree.xml"
    resultFormat="e4x"
    result="initList(event)"/>
    <mx:HDividedBox width="100%" height="100%">
    <mx:Tree id="myTree" width="50%" height="100%"
    labelField="@label"
    showRoot="false" dataProvider="{XLC}"
    change="treeChanged(event)"/>
    <mx:TextArea height="100%" width="50%"
    text="Selected Item: {selectedNode.@label}"/>
    </mx:HDividedBox>
    </mx:Application>
    "hybak" <[email protected]> wrote in message
    news:fd5gao$229$[email protected]..
    >I want to get the tree item which my cursor points to
    when my cursor moves
    >over
    > a tree.
    > I can get a row index in itemRollOver event, but it
    seems useless.
    > And I don't know how to use getObjectsUnderPoint method.
    > Is there anyone who can help me?
    >

  • Tree item when-tree-node-selected fires differently from 6i to 10g.

    In forms 6i, when you keyboard navigate between tree nodes, the wtns trigger will fire. In 10g it does not. In 10g, it will fire if you press the tab key or mouse click on a node.
    Anyone know if this was done on purpose?
    I ran into this after finally trying my props.fmb in 10g. It works fine in 6i, but not in 10g
    copy of my form is here:
    http://www.tailboom.com/oracle.php
    Forms [32 Bit] Version 6.0.8.18.3 (Production) cleint server
    Forms [32 Bit] Version 10.1.2.0.2 (Production)
    I wrote most of the tree handling code for oracle apps APPTREE. This is the code that most if not all tree's in apps uses to build standard tree. So I have a pretty good understanding of the forms tree item. And know the wtns fired for web forms 6i on every node like 6i client server. This is very strange IMO.
    Thanks.
    --pat                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Oleg,
    thanks for the reference. Although the bug you identify deals with when-tree-node-activated, it is possible they fixed the when-tree-node-selected issue at the same time. With my test tree, i can currently duplicate both issues. I tried to download the patch, but it is only available for linux and unix. No windows patch. I don't have my linux env up and running to where I can test yet. So I can not confirm.
    --pat                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • [svn:fx-trunk] 11454: ASyncList class ASDoc change: added explicit warning about the lack of support for re-inserting pending items .

    Revision: 11454
    Author:   [email protected]
    Date:     2009-11-04 18:17:33 -0800 (Wed, 04 Nov 2009)
    Log Message:
    ASyncList class ASDoc change: added explicit warning about the lack of support for re-inserting pending items.
    QE notes:
    Doc notes:
    Bugs:
    Reviewer:
    Tests run:
    Is noteworthy for integration:
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/AsyncListView.as

  • Problem in using AdvanceDataGrid as tree with drag n drop functionality

    Hi All,
    I am using AdvancedDataGrid as tree for displaying my data. Within this ADG tree I have to enable drag n drop i.e. user can select one node and will able to drop that on another node within tree.
    Overwritten dragDrop handler event for ADG.
    Issues: Not getting target node on which I am dropping currently selected node.

    Please don’t use this forum for support questions, go use flexcoders or the Adobe forums instead.
    Matt
    On 2/10/09 11:21 PM, "rakess" <
    [email protected]> wrote:
    A new discussion was started by rakess in
    Developers --
      Problem in using AdvanceDataGrid as tree with drag n drop functionality
    Hi All,
    I am using AdvancedDataGrid as tree for displaying my data. Within this ADG tree I have to enable drag n drop i.e. user can select one node and will able to drop that on another node within tree.  
    Overwritten dragDrop handler event for ADG.
    Issues: Not getting target node on which I am dropping currently selected node.
    View/reply at Problem in using AdvanceDataGrid as tree with drag n drop functionality <
    http://www.adobeforums.com/webx?13@@.59b7e11c>
    Replies by email are OK.
    Use the unsubscribe <
    http://www.adobeforums.com/webx?280@@.59b7e11c!folder=.3c060fa3>  form to cancel your email subscription.

  • How to insert new Item in JCombox through setEditable?

    Hey guys,
    Is there somebody who can help me on how to insert new Item in the JComboBox through setEditable?
    JComboBox box  = new JComboBox();
    box.addItem("");box.addItem("a");
    box.addItem("b");
    box.setEditable(true);
    When I run it and selected the index 0 which the one which color red, I want to edit it and when I press enter key it will add a new item, but preserving this " box.addItem(""); , what I want is to add like this one, box.addItem("The new text entered"); "
    Can you help me with this one... Thanks

    hello,
    the following demo may help,
    import java.awt.BorderLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.DefaultComboBoxModel;
    import javax.swing.JButton;
    import javax.swing.JComboBox;
    import javax.swing.JFrame;
    * comobo.java
    * Version 1.0
    * Date Jan 3, 2006
    * Copyright spatika
    public class comobo extends JFrame implements ActionListener{
         JComboBox jc = new JComboBox();
         DefaultComboBoxModel lm = new DefaultComboBoxModel();
         JButton jb = new JButton("add");
         public comobo(){
              lm.addElement("");
              lm.addElement("1");
              lm.addElement("2");
              lm.addElement("3");
              jc.setModel(lm);
              jc.setEditable(true);
              jb.addActionListener(this);
              getContentPane().add(jb,BorderLayout.NORTH);
              getContentPane().add(jc,BorderLayout.SOUTH);
              pack();
              setVisible(true);
              setDefaultCloseOperation(EXIT_ON_CLOSE);
         public void actionPerformed(ActionEvent i){
              Object text = jc.getSelectedItem();
              jc.setSelectedItem(null);
              lm.addElement(text);
         public static void main(String artgs[]){
              new comobo();
    }thanks
    daya

  • Scroll bar in Tree item

    hi
    I would like to know if there is a way to get rid of the scroll bar in a tree item.. normally in other applications, windows explorer for eg. when the contents of the explorer is within the view, the scroll bar disappears automatically and when the contents exceeds the view, the scroll bar appears...
    is it possible to change the line style of the tree nodes to doted or broken lines...
    moreover.. is it possible to rename or edit a tree node just like windows explorer.. right now im calling another canvas on 'when-tree-node-activated' trigger..
    i have written a search function just like the one in the forms object navigator... in forms 6. the hi-liter don't position itself if the search result exceeds the view.. it works in 6i.. i wish all the above queries can be met with 6i..
    plz help.. thanx in advance

    1) Scroll bars - scroll bars appear and disappear automatically based on the tree length when run over the web. Unfortunately there is no property for this in client-server
    2) You cannt change the line style, just the icons
    3) In order to rename or edit a tree node use
    FTREE.SET_TREE_NODE_PROEPRTY you can use it to change the node label and node value
    Hope this helps,
    Candace Stover
    Forms Product Management

Maybe you are looking for