How about the Focus property?  With a ListView at least, that property
returns the index number of the item with focus (not necessarily
selected).

Jamal
On Fri, 5 Dec 2008, Doug Geoffray wrote:

> Date: Fri, 05 Dec 2008 11:09:49 -0500
> From: Doug Geoffray <[EMAIL PROTECTED]>
> Reply-To: [email protected]
> To: [email protected]
> Subject: Re: itunes indexing
>
> Doug L. has a very good point.  Unfortunately iTunes didn't implement
> this correctly <smile>.  When I did:
>
> Set blah = FocusedWindow.Accessible.Selection
>
> I got a collection of all the children, not just the selected ones.
> Welcome to our world <smile>.
>
> Doug
>
> Doug Lee wrote:
> > If ITunes implemented .AccSelection correctly, you might just be able
> > to do FocusedWindow.Accessible.Selection to get a list of the selected
> > children.  Beware, though, that Doug G.'s method uses the
> > State_System_Selected bit, whereas mine uses the .AccSelection list;
> > and an application should, but does not always implement them so that
> > their results are identical.
> >
> > On Fri, Dec 05, 2008 at 10:45:43AM -0500, Doug Geoffray wrote:
> >
> >    Juan,
> >    You can just go through the children and look at the state of each.
> >    When you get one that is "Selected", that is the current index.  So
> >    something like this for example:
> >    set allChildren = FocusedWindow.Accessible.Children
> >    total = allChildren.Count
> >    currentIndex = 0
> >    for i=1 to total
> >        If allChildren(i).State.Selected Then
> >           currentIndex = i
> >           Exit For
> >        End If
> >    next
> >    ' at this point currentIndex is the first selected index or 0
> >    otherwise
> >    Of course if there are multiple items selected you would need to
> >    account for that but this should get you going.
> >    Regards,
> >    Doug
> >    Juan Hernandez wrote:
> >
> >    Hello,
> >
> >
> >
> >    the list view used in itunes is a WTCustomControl.  I have noticed
> >    that in jaws, the index information is given to the screen reader ie:
> >    32 of 1442 etc.
> >
> >
> >
> >    I can get the number of items in the list by accessible.children.count
> >
> >
> >
> >    but what would be some ways to get the current index that is selected?
> >
> >
> >
> >    Thanks for any help.
> >
> >
> >
> >    Juan
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >    Juan Hernandez
> >
> >    [EMAIL PROTECTED]
> >
> >    858-699-2105
> >
> >
> >
> > --
> > Doug Geoffray
> > GW Micro, Inc.
> > Voice 260-489-3671
> > Fax 260-489-2608
> > [2]http://www.gwmicro.com
> >
> > References
> >
> >    1. mailto:[EMAIL PROTECTED]
> >    2. http://www.gwmicro.com/
> >
> >
>
> --
> Doug Geoffray
> GW Micro, Inc.
> Voice 260-489-3671
> Fax 260-489-2608
> http://www.gwmicro.com
>

Reply via email to