I don't understand what the UpDown control is supposed to do in a
dialog.
I would appreciate some explanation of this control.
Below is the .vbs and the .xml files that I am trying to use.
The dialog will come up with the editBox and two buttons.
If somebody could show me how to make the upDown control do something
useful I would appreciate it!
' DialogUpDown
Dim myHotkey : Set myHotkey =
Keyboard.RegisterHotkey("Alt-Control-Shift-I","MyUpDown")
Dim isVisible : isVisible = 0
Sub MyUpDown()
If isVisible = 0 Then
Queue "DisplayDialog"
End If
End Sub
Sub DisplayDialog()
Dialog "DialogUpDown.xml", "DialogUpDown", "DialogEventHandler"
End Sub
Function DialogEventHandler(dObj, dEvent, dId, dControl)
DialogEventHandler = False
Select Case dId
Case "UpDown"
DialogEventHandler = True
Exit Function
Case "btn_ok"
If dEvent = buttonClicked Then
edit_sample1(dObj)
' dObj.Control("UpDown").Text
Sleep 200
DialogEventHandler = True
Exit Function
End If
Case "btn_close"
If dEvent = buttonClicked Then
Speak "Closing dialog"
Sleep 1000
DialogEventHandler = True
IsVisible = 0
dObj.Close
Exit Function
End If
Case Else
If dEvent = dialogCreated Then
isVisible = 1
DialogEventHandler = True
Exit Function
End If
End Select
End Function
Sub edit_sample1(dObj)
Dim textToSpeak
TextToSpeak = dObj.Control("edit_sample1").Text
Speak "You entered " & textToSpeak
L = Len (TextToSpeak)
Speak "your text is " & L & " characters long. "
End Sub
' Here is the .xml file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wescriptui>
<options>
<languageorder>
WE,OS,en-us
</languageorder>
</options>
<language id="en-us">
<dialog id="DialogUpDown">
Dialog Up Down
<group>
<group orientation="vertical">
<editbox id="edit_sample1" height="200" width="200" lines="multiple"
textalign="left" restrictions="none"
readonly="no" returns="yes" maxlength="1000" scroll="vertical">
</editbox>
<updown id="ud_sample1" buddy="edit_sample1">
</updown>
</group>
<group>
<button id="btn_ok" system="ok" default="yes" widthclass="btn">
OK
</button>
<button id="btn_close" system="cancel" widthclass="btn" width="+10">
Close
</button>
</group>
</group>
</dialog>
</language>
</wescriptui>
Jeff Weiss, CVRT
Rehabilitation Teacher
Lions World Services for the Blind
2811 Fair Park Blvd.
Little Rock, AR 72204
http://www.lwsb.org
The Mission of LWSB is to educate adults who are blind or visually
impaired for careers and independent lives.