Hi Chip,
Thanks for the thought, but that is what I wanted to avoid, not use. Yes
that would be easy, but, would prevent one from going down the list to
select one item, focus would just do everyone that got focus...
In other words, you can't record while your playing a wav file or
converting text to wav and have it play...
I did not need to use the tree view, in fact had buttons, the ID for
each is still there, just only as comments. I wanted to use a tree view like
a combo box and such for easy traversing but with both cursor keys and a
mouse.
Having done this gives more a feeling on how the object model book is
structured by still badly in need of better understanding. Such as a key
object, but how do you get a key object? Things like that which are very
difficult to get out of that manual. You can find the keys object and how it
is gotten, but where the key object is, I could not find and did not want to
waste more time than I already had done.
but, in the end I have a better understanding on how each object
interacts in this manual and this enriches my feeling on how the book works.
the tree view at the moment is only in the body of the main dialog box
under the main menu. I use the empty space of the tree view or item 0 as the
help for that menu. Now that one location could be just a focus item without
hitting the space bar. But, I wanted to keep everything the same and only
have help come up when someone wanted it. I was also thinking of adding the
F1 hotkey to do this but would involve lots of entries for the strings and
will leave that for the end of this project.
For in the end every display field will be a string entry. Language
conversion can be done on strings only and having that could allow voice
change as well that is built into this program.
Not like the Windoeeyes class you use for the MSWord, but this program
is based on using the Sapi voices, not Windoweyes. Those Sapi voices come
with most packages and the only one that is a problem in speech is the pitch
adjustment for some in Sapi; and maybe that can be resolved if I read specs
on those voices.
If you were to use Sapi for your one problem, the speech delay would be
fixed immediately using the XML command.
At the moment what I posted works perfectly. I had to add the other
tests and such inside the calling procedures to filter out modifier keys and
such that can cause a lot of headaches in the keyup event. The queue
procedure is almost universal if I were design this tree view inside the
Make TTS dialog, but the TTS Make option hinders that. But everything else
can get copied over with just different item numbers.
At least I figured out what is going on in the treeview, what events
fire and knew them before Aaron mentioned it, but did not have the location
in the Microsoft library to verify what is not available. But there is a
return event I found and such, so there is some issues of what is being
captured inside the Treeview event according to what Microsoft said, but
did not read to far into to it, because I figured out how to do it with what
is given under the WE object model.
But anyway thanks for the thought, I already ruled that one out because
of what I was doing. Looking at a list view, they have the same events, so I
could have gone there but wanted something to fold up when not needed and
wanted to learn how to use it. Granted the list view has much more in it's
cookbook, but that is for a later project.
Bruce
Sent: Thursday, August 11, 2011 8:53 PM
Subject: RE: Tree view
Hi Bruce,
It seems like you want something to happen when there's a treeview focused
and the user pressed a key? You could also define a hotkey then when the
treeview gets focus. might be simpler ... don't know without having done
the work.
Chip
-----Original Message-----
From: BT [mailto:[email protected]]
Sent: Thursday, August 11, 2011 12:07 PM
To: [email protected]
Subject: Re: Tree view
For all new programmers,
Below is the final - finish of my project on tree view selections.
Bruce
This is my dialog procedure for event capture and what I did using the tree
view option instead of buttons; reduced to only the tree view items.
Function MainDialogProc...
If dEvent = treeviewKeyDown Then
Set TV_Obj = myDialog
TV_KeyDown = True
myTV_KeyConnection = ConnectEvent( Keyboard, "OnKeyProcessedUp",
"OnKeyProcessedUp")
End If
If dEvent = treeviewClicked Then
Set TV_Obj = myDialog
TV_MouseDown = True
myTV_MouseConnection = ConnectEvent( Mouse, "OnButtonUp", "OnButtonUp")
End If If dEvent = treeviewSelectionChange Or dEvent = treeviewClicked Then
TV_Name = dControl.Text
TV_Data = dControl.selected.Data
MainDialogProc = True
Exit Function
End If
'... other event selections
'End of my dialog proc
End Function
Sub OnKeyProcessedUp( ky, md)
Disconnect myTV_KeyConnection
myTV_KeyConnection = 0
If TV_KeyDown and ky = 32 and md = 0 Then
Queue "TV_Options"
End If
TV_KeyDown = False
End Sub
Sub OnButtonUp( button)
Disconnect myTV_MouseConnection
myTV_MouseConnection = 0
If TV_MouseDown and button = 0 Then
Queue "TV_Options"
End If
TV_MouseDown = False
End Sub
Sub TV_Options()
' Do Treeview Items.
Silence
Select Case TV_Data
Case 0
' Speak " Navigate through tree then mouse click on or press space bar to
do selection. "
promptArray(1) = myStrings( "treeview_info")
promptArray(2) = " Cuckoo clock Options "
Queue "msgBoxOk"
Case 1
promptArray(1) = myStrings( "dialogbox_info")
promptArray(2) = " Cuckoo clock Menu "
Queue "msgBoxOk"
Case 2
Queue "DoAnnouncement"
Case 3 ' dId = "btn_mainDialog_listen"
Queue "SearchAndPlayWav", TV_Obj
Case 4 ' dId = "btn_mainDialog_copy"
Queue "SearchAndCopyWav", TV_Obj
Case 5 ' dId = "btn_mainDialog_rename"
Queue "SearchAndRenameWav", TV_Obj
Case 6 ' dId = "btn_mainDialog_delete"
Queue "SearchAnddeleteWav", TV_Obj
Case 7
If RecordEnabled Then
Queue "RecordAndPlay", ""
Else
Speak " No Record Feature Enabled! ", speakerVoice
End If
Case 8 ' "btn_mainDialog_tts"
editSearchType = myStrings( "Txt_Search_Type")
editSearchExtension = myStrings( "Txt_Search_Ext")
Queue "LaunchTtsDialog"
Case 9 ' dId = "btn_mainDialog_playText"
Queue "SearchAndPlayText", TV_Obj
Case 10 ' "btn_mainDialog_time"
Queue "DoTime"
End Select
End sub