Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
elm.ScrollTo
#1
I feel like I've been asking too many questions.  I have made a lot of progress and have figured out almost everything I need to be "feature-parity" with all the QM2 stuff I've created & re-used for automation on a daily basis..  One that is troubling me is scrolling to an element that happens to be hidden / off screen.

The ScrollTo method seems to be the ticket, but if I use Elm.Find to locate the item, it doesn't seem to work.  Adding the  EFFlags.UIA flag sometimes works, but causes collateral damage (invoke method doesn't work for example).  Other times adding the flag fails to find the element at all.

In QM2 I had a global function I created like this:
 
Code:
Copy      Help
 
act w
act a
int c = child(a)
SendMessage c LVM_ENSUREVISIBLE a.elem-1 0 

I'm wondering if there's an alternate approach to "scroll".  elm.Focus() sometimes works.  But in the case of SysListView32, I have mixed results with the Focus method.  Sometimes the element will get "selected" but the window doesn't scroll to that element.

Thoughts?  (and I think this is my last one for a while and I really hope my pain in figuring stuff out helps someone else when searching the forum).


Messages In This Thread
elm.ScrollTo - by netdude78 - 11-16-2021, 12:27 AM
RE: elm.ScrollTo - by Gintaras - 11-16-2021, 06:12 AM
RE: elm.ScrollTo - by netdude78 - 11-16-2021, 04:25 PM
RE: elm.ScrollTo - by Gintaras - 11-16-2021, 04:39 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)