SPONSORS:






User Tag List

Results 1 to 6 of 6
  1. #1
    Senior Member
    Join Date
    Sep 2001
    Location
    Hyderabad, India
    Posts
    478
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Use of arrow keys with Tree View control.

    Hi all,

    I am testing a windows application having a explorer like interface. In the tree view control, I am trying to set focus on a node with the help of arrow keys. But sometimes due to some reason, it behaves abnormally. Instead of setting focus on the required node, focus moves up and down and then it is set on some node above or down to required node.

    ------------------
    Manoj Jain
    (manojjain99@yahoo.com)
    Manoj Jain
    (manojjain99@yahoo.com)
    A highly advanced bug is indistinguishable from a feature.

  2. #2
    Member
    Join Date
    May 2001
    Location
    Rochester, NY, USA
    Posts
    61
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Use of arrow keys with Tree View control.

    If the control is indeed of class 'treeview' why are you not just performing a 'Select' method on it? If it in not of class TreeView, you may need to perform a 'ExposeItem' method on the node. Determine what properties and methods are exposed for your particular class and then go from there. You may need to develop a custom 'Select' method. I have custom select methods for classes 'OLETreeView' and 'OLESSTreeView' if your objects class is one of these. I try to stay away from using the keyboard events as much as possible to interact with the GUI, especially with trees and grids because if the tree or grid changes, the object selection will fail.

    Steve

    ------------------
    Steven P. Blunt
    Software Automation Technical Lead
    NASG Sales Force Productivity
    Steven P. Blunt
    Software Automation Technical Lead
    NASG Sales Force Productivity

  3. #3
    Senior Member
    Join Date
    Sep 2001
    Location
    Hyderabad, India
    Posts
    478
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Use of arrow keys with Tree View control.

    OK.

    My application is developed in VB6. Its tree view control is used on the form. At the run time nodes are added to it. Can I have your customed SELECT method.

    ------------------
    Manoj Jain
    (manojjain99@yahoo.com)
    Manoj Jain
    (manojjain99@yahoo.com)
    A highly advanced bug is indistinguishable from a feature.

  4. #4
    Member
    Join Date
    May 2001
    Location
    Rochester, NY, USA
    Posts
    61
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Use of arrow keys with Tree View control.

    If the class is indeed a standard VB TreeView then the Select method should work on the item. You can use wildcards in the path or the index of the path if the node is added at runtime and the exact path is not known. The context for the method is treeview.Select(Item), where Item is the path or the index of the item.

    ------------------
    Steven P. Blunt
    Software Automation Technical Lead
    NASG Sales Force Productivity
    Steven P. Blunt
    Software Automation Technical Lead
    NASG Sales Force Productivity

  5. #5
    Member
    Join Date
    Feb 2001
    Location
    New York, NY
    Posts
    41
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Use of arrow keys with Tree View control.

    This is just sloppy programming from Segue again. It works just as bad with java Tree View. After I record a script, I have to go back in to the code and fix navigation.
    The .Select methods works OK on the play back but not on the recording.

    ------------------
    -Lev Aks
    lev_aks@in-nyc.com

  6. #6
    Senior Member
    Join Date
    Sep 2001
    Location
    Hyderabad, India
    Posts
    478
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Use of arrow keys with Tree View control.

    OK. Now I try to use Select method to set focus on my required tree node.

    Thanks to all.

    ------------------
    Manoj Jain
    (manojjain99@yahoo.com)
    Manoj Jain
    (manojjain99@yahoo.com)
    A highly advanced bug is indistinguishable from a feature.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 05:57 PM.

Copyright BetaSoft Inc.