Scrollbar in Tree Control = wonky

The TREE control scrollbar seems to have some ill-thought-out behavior.
1... Run the example TREE ENHANCEMENTS (Examples - Building UIs - Displaying Data - General )
2... Choose a folder on your machine with a few (3-5) folders in it but lots of files and folders contained within those folders.
3... Select the PATTERN as appropriate.
4... Run the VI.  Your files should show up in the list, then the list collapses.
5... Expand the folders, so that there are more items in the list than it can display at one time.
6... The scrollbar appears (that's sensible).
7... Scroll down so that items disappear off the top.
8... Right click and choose CLOSE ALL ITEMS
--- I would expect the control to automatically move back up to the top, so you could see something, but it doesn't.
9... Play with the scrollbar thumb.  Not exactly sensible.
Here is a JING to watch, showing this behavior.
The code that populates this tree is copied from the example (and modified to remove file extensions).
Once the tree is populated, the code is doing nothing (except waiting for a QUIT button).
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com
Blog for (mostly LabVIEW) programmers: Tips And Tricks

Just run the example I mentioned.  It's not code that does it - it's the behavior of the tree control itself.
But you need to structure the folders so that you have a few (< # lines in tree) root-level folders, and many (> #lines in tree) sub-folders/files, whatever.
When you collapse the tree, I would expect the scrollbar to adapt to the new situation, and possibly disappear.  Instead, it's working on old information, I suppose.
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com
Blog for (mostly LabVIEW) programmers: Tips And Tricks

Similar Messages

  • Tree control bug for vertical scrollbar

    Dear all:
    I meet a problem with  tree control  vertical scrollbar.Pls check the picture
    If set the rows of the properties of the Tree control is a number, also set the vertical scroll bar is visible.
    Then if i set the height  of Tree is unchangeable, then set the Tree childs rows are  much more than the height, The problem is that  the vertical scroll bar doesn't work. The height is increase than what i have set ,Maybe it is a bug? or not.
    Anybody find this?
    Attachments:
    Image000011.jpg ‏66 KB

    Hello,
    I works fine with me.
    But I added my test as attachment, so you can see if you maybe doing something else.
    Kind regards,
    André
    Regards,
    André
    Using whatever version of LV the customer requires. (LV5.1-LV2012) (www.carya.nl)
    Attachments:
    Tree control bug question.vi ‏20 KB

  • Need help for tree control

    Hi everybody,
    I am getting a display problem with tree control. The tree
    control has a fixed height and width, and has quite a few nodes
    with different level of branches. When i have the tree fully
    expanded, then I am getting both horizontal and vertical scrolls.
    If I scroll down using vertical scrollbar and scroll right using
    horizontal scrollbar, I am able to see the tree node labels
    properly. But after that if I scroll up then the nodes that had got
    hidden due to the previous down scroll appear cut off.. the label
    is half way erased.

    Hi everybody,
    I am getting a display problem with tree control. The tree
    control has a fixed height and width, and has quite a few nodes
    with different level of branches. When i have the tree fully
    expanded, then I am getting both horizontal and vertical scrolls.
    If I scroll down using vertical scrollbar and scroll right using
    horizontal scrollbar, I am able to see the tree node labels
    properly. But after that if I scroll up then the nodes that had got
    hidden due to the previous down scroll appear cut off.. the label
    is half way erased.

  • How can I display and change built-in symbols of a tree control programmatically?

    I want to set the built-in symbols of a tree control during runtime.
    I only found an example to assign custom pictures but not how to select one of the 40 built-in symbol.
    Many Thanks 
    Solved!
    Go to Solution.

    The ActiveItem.SymbolIndex will allow you to select the symbol for the active item. You can use the ListBox Symbol Ring Constant (Dialog and User Interface palette) to select a symbol (or you can just enter the number directly if you know what it is).
    Message Edited by smercurio_fc on 07-10-2008 09:36 AM
    Attachments:
    Example_VI_BD6.png ‏2 KB

  • Not able to get the database data into the Tree Control

    Hi Everybody,
                        I have to populate the tree control with nodes and items, which is to be populated from the database, and the tree control is <b>dynamic</b>. I mean, there is a <b>toolbar</b>, whenever a <b>pushbutton is clicked</b>, depending on that the tree contents has to be changed.
    If anybody had worked with <b>CL_GUI_COLUMN_TREE</b> control to get the data from database, depending upon the <b>pushbutton selected in Toolbar</b>, please paste the seudocode for it.
    Regards,
      Abdul,
    Intelligroup.
    P.S: Helpful answers will be rewarded.

    have you seen this demo program
    SAPCOLUMN_TREE_CONTROL_DEMO
    Regards
    Raja

  • How to get all items under a parent item in a tree control

    Hello,
    I have 2 questions regarding a tree control:
    1) Is there any way to specify a parent item tag and get an array of ALL its sub item tags? For example, in the attached vi, specify the Parent#2 parent tag and get an array containing Item#P21 and Item#P22
    2) Is there a way to specify a range to the ActiveCell property. For example, all items from line#1 to line number#3
    Any ideas?
    Attachments:
    Tree example.vi ‏6 KB

    Mentos wrote:
    1) Is there any way to specify a parent item tag and get an array of ALL its sub item tags? For example, in the attached vi, specify the Parent#2 parent tag and get an array containing Item#P21 and Item#P22
     Did you try a search? There's no direct way of doing this. You have to navigate the tree and build up an array. You can find an example here: http://forums.ni.com/t5/LabVIEW/get-all-children-o​f-a-parent-in-tree/td-p/729548
    2) Is there a way to specify a range to the ActiveCell property. For example, all items from line#1 to line number#3
    No. (It's called ActiveCell, not ActiveCells) Presumably you are trying to perform an operation on multiple items. Unfortunately, you need to use a loop. You should defer panel updates if you're doing this a lot.

  • How to binding incoming xml node list to the tree control as dataProvider

    Recently, I faced into one issue: I want to binding incoming xml node (it's not avaliable at start) list to the tree control as a dataProvider.
    Since the incoming xml node list is not avaliable at beginning but I needs to bind it to the tree, so I create one virtual one in the xml, and prepare to remove it before the tree is shown. (ready for the actual node adding). But It did not work.
    Please see the presudo-code here:
    1.  Model layer(CsModel.as)
    public class CsModel
            [Bindable]
            public var treeXML:XML=<nodes><car label="virtualOne" id="1">
                                   </car></nodes>;
            (Here, I want to build binding relationship on the <car/> node,
             one 'virtual/stub' node is set here with lable="virtualOne".
             But this node will be deleted after IdTree
             control is created completely.)      
            [Bindable]
            public var treeData:XMLList =new XMLListCollection(treeXML.car);
    2. view layer(treePage.mxml)
            private var _model:CsModel = new CsModel();
            private function addNode():void
                    var newNode:XML=<car/>;
                    newNode.@label="newOne";
                    newNode.@id=1;
                    _model.treeXML.appendChild(newNode);
                             private function cleanData():void
                                     delete _model.treeXML.car;
            <mx:VBox height="100%" width="100%">
            <mx:Button label="AddNode" click="addNode()" />
            <mx:Tree id="IdTree"  labelField="@label"
              creationComplete="cleanData()"
              dataProvider="{_model}"/>
        </mx:VBox>
    3. Top view layer (App.Mxml)
    <mx:application>
        <treePage />
    </mx:application>
    For method: cleanData(),It's expected that when the treePage is shown, we first delete the virutalOne to provide one 'clear' tree since we don't want show virtualOne to the user. The virutalOne node just for building the relationship between treeData and treeXML at beginning. But the side effect of this method, I found, is that the relationship between treeXML and treeData was cut off. And this leads to that when I added new node (by click the 'addNode' button) to the xmlXML, the xmlData was not affected at all !
    So Is there any other way to solve this issue or bind the incoming xml node list to the xmlListCollection which will be used as Tree control's dataProvider ?

    If u want to display the name : value then u can do like this
    <xsl:eval>this.selectSingleNode("name").nodeName</xsl:eval> : <xsl:value-of select="name" />

  • How can I save the all the values of a tree control ?

    I have a problem, in run time, I adds new items on a tree control, but i don´t know how I can save the values of the child text of each item in a file.
    Thanks.

    I'm no expert on the tree control, but I made a small example to save all items to a textfile, including item tag, item string, and indent level. One drawback of this method is that it fully expands the tree regardless how the user left it. To go the other direction, you'd have to write a routine to go through the text file and programmatically build the tree.
    To master the tree control, I think you have to resort to creating a control reference for it and using the Invoke Node to do some operations. For another approach to traversing and operating on a tree, check out the "Traversing Tree Controls and Setting Custom Symbols" (search the NI Developer Zone site).
    Best of luck,
    John
    Attachments:
    Save Tree Structure to Textfile.vi ‏32 KB

  • How can I drag and drop an item from one Tree control to another in LabVIEW 7.1?

    You can use the mouse up and down event on the two tree controls but the problem is making the correct selection in the second tree control. I want to be able to switch over to the selection bar of the second tree control so that I can place my item in the correct position. I know all possible workarounds with double-clicks and so on... but I really want a windows drag and drop.
    This is what I have for the moment. Please check the library below. I need to activate the selection bar of the second tree control somehow to get the position in the control. The VI below is written in LV 7.1
    Attachments:
    Drag&Drop.llb ‏65 KB

    Hi Jones,
    As far as I know this feature is currently not supported by the Tree control. A workaround, would be to use the vertical position of the mouse in the button up event to determine what line you�re dropping the item.
    If you would like the Tree control to include the drag and drop feature, please submit this as a Product Suggestion under the feedback at www.ni.com/contact.
    Good luck!
    Best regards,
    Philip C.
    Applications Engineer
    National Instruments
    www.ni.com/ask
    - Philip Courtois, Thinkbot Solutions

  • How to use the drop event of the tree control in LabVIEW 8.20?

    Hi,
                I am using the two tree controls in my application to provide a option for the user to drag and drop item from one tree to the other.  I have to validate the user selection. I tried to capture the user drop event  using the event structure. The problem I am facing is, I am not able to drop the item even though i have wired a constant true to the filter(Accepted?) in the event case. I have enable the property(Allow droping) in the right menu of the tree control also.
              While configuring an event case for (drop, drag entered and some thing like this) only I am getting the problem otherwise it is working fine.  
    What do i need to do to caprture the drop event ?
    Is there any way to avoid the item duplication while droping a new item in the tree control ?
    or how can i do this?
    Thanks,
    Pandiarajan R

    Hi Pandiarajan,
    I hope you are doing well today! There is a lengthy discussion on the Tree Control Drag & Drop feature at this forums post including contributions from the developer of the Drag & Drop feature:
    Tree Control Drag & Drop in LabVIEW 8
    By avoiding item duplication, do you mean that you don't want the same item to be in the old tree control or do you not want more than one item in the new tree control?
    Adnan Zafar
    Certified LabVIEW Architect
    Coleman Technologies

  • How to get position of a ring in a tree control?

    Ok, this is probably a stupid question, but how does one get the position of a ring inside of a tree control?  I have a tree with two columns, with rings in the second column.  I can set the position using SetTreeCellRingValueFromIndex(), but how does one get the position after the user has modified the control?  I found the functions GetTreeCellRingIndexFromValue() and GetTreeCellRingValueFromIndex() but I haven't found a way to get either the Index or the Value of the ring (what I'm looking for is the index, but if I can obtain the value I can go from there).  Thanks in advance!
    Solved!
    Go to Solution.

    Hi,
    You can use GetTableCellVal function to get the value of the ring.
    There is not special "ring" function for that. Maybe that's what you were searching for
    From the value you can get to the index using the functions you are already aware of.
    Hope this helps,
    S. Eren BALCI
    www.aselsan.com.tr

  • 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

  • Tree control - How to get the full path of selected Item in tree control

    I am Flex newbie. When the user clicks the particular item in
    the tree control I just wanted to get it name along with it's full
    parent.
    Here is my XML
    var dirXML:XML=<root basename="/home/tcegrid">
    <Directories>
    <Dir Name=".autosave" />
    <Dir Name=".emacs.d" />
    <Dir Name="AnsysDistributed">
    <Dir Name="opt"/>
    <Dir Name="root" />
    </Dir>
    <Dir Name="postgres"/>
    <Dir Name="FineTurbo"/>
    <Directories>
    </root>
    The above XML is data provider for Tree control. When the
    user clicks the Dir Name called opt. I wanted it absolute path in
    XML. say Directories.Dir.Dir.@Name is opt
    Can any one tell me how to get this?

    "Thamizhannal" <[email protected]> wrote in
    message
    news:gam9q8$4es$[email protected]..
    >I am Flex newbie. When the user clicks the particular
    item in the tree
    >control
    > I just wanted to get it name along with it's full
    parent.
    > Here is my XML
    > var dirXML:XML=<root basename="/home/tcegrid">
    > <Directories>
    > <Dir Name=".autosave" />
    > <Dir Name=".emacs.d" />
    > <Dir Name="AnsysDistributed">
    > <Dir Name="opt"/>
    > <Dir Name="root" />
    > </Dir>
    > <Dir Name="postgres"/>
    > <Dir Name="FineTurbo"/>
    > <Directories>
    > </root>
    >
    > The above XML is data provider for Tree control. When
    the user clicks the
    > Dir
    > Name called opt. I wanted it absolute path in XML. say
    > Directories.Dir.Dir.@Name is opt
    > Can any one tell me how to get this?
    loop until the parent() property of the XML node is empty.
    HTH;
    Amy

  • How to render image in tree control without embed it

    Hello frndz i am working on tree control and want to show imagein its node through xml list collection.i have searched a lot for this but in every example with tree control images are embeded.i dont want to hardcode the image.Need to make the image comes from database(Xml).so is there any live or demo example for tree control.
    Thanks in Advance
       Vineet osho

    if you decompile the imaging.ear file, there is a web.xml file which you can add the following parameter:
    <context-param>
    <param-name>oracle.adf.view.rich.security.FRAME_BUSTING</param-name>
    <param-value>never</param-value>
    </context-param>
    or take a look at      Receiving "Warning: Unable to load content in a frame. Frame content will load at the top level." When Trying to Use the <af:inlineFrame> Component [ID 1266770.1] on Oracle Support.
    Make sure you take a copy of the imaging app before you make changes. You can then upload back through the weblogic console.
    Sudi

  • Tree-control for data input?

    Hi,
    I need to program an input screen for values that have hierarchical dependencies (e.g. sums). I feel, the most adequate user-interface would be a tree control, because of the data dependencies and also because the users asked for a possibility to collapse/expand parts of the data during input.
    I had a look at CL_GUI_COLUMN_TREE, but I'm not sure, if it can be used for data input. Has anyone done something like this before or can anybody direct me to some additional sample coding? (the sample coding in the reuse library didn't do it...)
    Thanks for your help, greetings, Kathrin!

    Hello Kathrin,
    Since you say that the user's input is hierarchical in nature, it is nice to have a tree-control for input. But, the choice of using a custom-control-version of the tree is a cause for some concern. I cannot recollect any of the SAP screens where the input can be given through such a tree framework (please do let me know if you have come across one). The problem with such a tree would be in the areas of even-handling. Filling the tree with appropriate data at the right times would be another challenge.
    However, there's one alternative that I would like to direct your attention to. You must have observed another kind of tree, when you select an application component from the APPLICATION HIERARCHY, which is just like a list. Also, the <i>Transport Organizer (SE09)</i>, <i>Menu Painter (SE41)</i> etc., have this kind of a tree. You can use this if you (or rather your users) are very particular on having a tree display. For more information, you can see the Function Group <b>SEUT</b>, which has the required function modules to accomplish the same. The Function Group is well documented, and you might have to work a little on the function modules themselves.
    Please do let me know if this is a suitable option to meet your requirement. All the best,
    Regards,
    Anand Mandalika.

Maybe you are looking for

  • To post an image stored in fields blob

    Hello, I adapted a PHP/Mysql script to post in a page an image which is stored in a base Oracle 8i. My PHP/Mysql script functions well, but not my script PHP/Oracle, it posts me nothing (besides one of empty image). Script of selection of the image:

  • SRM Monitoring

    Hello,         I have got the following error message in alert monitoring  in RZ 20 tcode:      : Output error in purchase order 2000315948 for output medium FAX which is related with SRM monitoring, I have no idea about SRM monitoring. Another kind

  • I can't open community pages or activity ?

    My enter net is slowly and I can't open the apple pages .

  • Redundancy with dual nic servers

    Hi I have 2 11500's configured with box-to-box redundancy. I have a number of app servers each with dual nic's (which are Teamed) and which are connected directly to the CSS's. Nic 1 in each goes to the master CSS1 and is therefore live. Nic2 goes to

  • Help with restoring Photoshop Elements 8 on a new hard drive on Mac

    I had a new hard drive installed on my Mac, and I get an error message concerning the license for Elements 8 when I try to use it from the back up. I have gone to the website and tried all the fixes, and nothing works. I want to continue to use Bridg