Forum Discussion

ChandanD's avatar
ChandanD
Contributor
6 years ago

Unable to identify the end of Panel

Hi,

I'm working with WPF objects. Developers have hidden the Scroll bar within the Panel. Now the situation is I'm unable to find the last object in the tree.

What I want to achieve is to search the items in the panel. It searches the panel in top to down approach but if I provide random list then when it reaches the end it doesn't start from top again.

I'm using MouseWheel(-1) to scroll down but it keeps scrolling continously.

Please find the screenshot of the all.

Please let me know how to script it to find end and start again from top.

I tried MouseWheel(1) and Object.Exists and Object.VisibleonScreen still it working for all the files.  It works for 1 or 2 files but later it fails again.

5 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    I would look into using "FindAllChildren" against the container of the tree itself to search for all items within the panel.  This will find all that are visible on screen and not, just listing what's in the panel.  This returns an array that you can just loop through from 0 to array length -1... and you can just loop through that as many times as you want.

    • ChandanD's avatar
      ChandanD
      Contributor

      Hello,

       

      Sorry for late reply!!

      I have already tried FindAllChildren, it didn't work for me. It was getting stuck at the end and couldn't go back to top unless I provide mousewheel(1) but with providing mousewheel(1) & mousewheel(-1) the script was just rotating up & down at same location.

      So finally I have to ask for solution in community. If you need I can share my code too.