| || |
I'm working with a listbox at the moment which contains a scrollbar, when searching for items in this scrollbar, if the bottom item is selected, the list moves down one, along with the scrollbar.
This means that when I search again through the list, my search will miss the first however many elements each time.
I know I could set the list back to the top easily (by using the Home button), however, my search needs to use a page at a time, so on the second page, the scrollbar position needs to remain fixed, however, I cannot find the position in the first place!
I have attached to the window, then to the ListBox, and attempted to output the position in a MsgBox:
TypeToControl "ListBox", "@ListBox", 'Left SingleClick'
hCtrl = ScrollBarFind("@ListBox")
it returns the handle of the window, but gives me this message when I run it:
Cannot perform the command on the specified control
Anybody had any success in using the Scrollbar functions, as so far they have caused me nothng but trouble!
Re: Scrollbar position
Sorry, missed this one!
As far as I am aware the Scrollbar commands only work on the active window and not individual controls within a window such as listboxes.
Helpful command what!