I looked through all of the treeview related structures, and didn't find any
property which held anything like the index.
 
I thought about grabbing the text which onFieldData would have spoken, and
pulling the string with the index out of it, but it doesn't look like you
ever get to see it, only an opportunity to replace it.
 
so, you're down to the way I suggested, or seeing what's available in the
MSAA events.  That is likely  to be more work, but if the siblings
collection is not in index order, then it's something you'll have to do as a
last resort (unless someone gives you a better idea).
 
You know, there's a treeview control script from GW, you could look at it to
see what it does; I don't use it, so I don't know if it gives you the index,
but if it does, you could see how they do it.
 
hth,
 
Chip
 

  _____  

From: J.J. Meddaugh [mailto:[email protected]] 
Sent: Saturday, December 11, 2010 11:19 PM
To: [email protected]
Subject: Re: Treeview Current Item


The treeview in Teamtalk isn't reading reliably, so I'm replacing the text
as you arrow through it. But in doing so, the index numbers are no longer
being read, as you said. Yes, there's that roundabout way of doing it, but
it seems like there should be a simpler way.
 

----- Original Message ----- 
From: Chip  <mailto:[email protected]> Orange 
To: [email protected] 
Sent: Saturday, December 11, 2010 8:58 PM
Subject: RE: Treeview Current Item

Hi J.J.,
 
Sorry, but I seem to have missed any earlier messages on this topic, so I'm
having to guess a lot at what you need.
 
I'd guess the index is a phrase which gives you the count and the total of
the items at the current level (so a phrase like 3 of 5)?
 
I see a treeViewItem has a property named siblings, which is a collection of
all the items at it's current level.
 
If they happen to be in the correct order (the displayed order), you could
iterate through the collection, looking for a match to the current item
you're working with, and incrementing a counter so when you find it, you'll
know it's number 3 and the count of the collection gives you the total.
 
Is this the kind of thing you were asking about?
 
Chip
 

  _____  

From: J.J. Meddaugh [mailto:[email protected]] 
Sent: Saturday, December 11, 2010 8:41 PM
To: [email protected]
Subject: Treeview Current Item


Hello. I have one more issue with making this treeview speak consistently.
I'm replacing the OnFieldData with my own text which is fine, but it also is
replacing the item index. So I need a way for this index to still speak.
What would be the easiest way of getting the index and total for the current
node so I can speak it if the user has the setting enabled?
It seems a bit strange that the item index gets replaced with my text but
the treeview depth is still spoken.
 
 
 

Reply via email to