Group id 14 of Page id 143,Line id 19 of Page id 143
widgets
Use this widget to show up to 6 values. The buttons on this page all exercise the widget by setting its properties to the desired values.
Set plotValues of the group to two numbers. The numbers will be automatically normalized to add up to 100%. The second number will be shown in the "exploded" slice.
Example: set plotValues of group "Chart One" to "10000,2000"
Note that the chart will still be plotted correctly even if it is not perfectly round. However, since the size of the pies is calculated by angle, not by surface, this can lead to a distorted view of the data.
Set plotOrigin of the group to a value in degrees which must be a number from 0 to 360, and a second number specifying the distance (in ToolBook units) by which to move the exploded slice.
Example: set plotOrigin of group "Chart One" to 45, 150
Note: The chart gets redrawn with the current values when you change the plotOrigin.
Set plotColors of the group to HLS color values or color names for the two slices.
Example: set plotColors of group "Chart One" to "green, 78,56,35"
plotValues
chart one
buttonUp
plotValues
"chart one"
1,2,3,4,5,6
plotValues
chart one
buttonUp
plotValues
"chart one"
plotValues
chart one
buttonUp
plotValues
"chart one"
2345, 1678, 1234
plotColors
blue,red,green,magenta,cyan,yellow
chart one
buttonUp
plotColors
"chart one"
Color Scheme 1
plotColors
magenta,cyan,yellow,red,blue,green
chart one
buttonUp
plotColors
"chart one"
Color Scheme 2
.&+ +E
.&+ +E
plotValues
plotValues
chart one
oldCursor
plotValues
tempVals
chartObj
buttonUp
oldCursor
-- This example recycles the current data
shown
-- chart
{. In a real
, you would
-- some other
-- Get
[bar height, store
display
minimum
chartObj =
yone"
plotValues =
barCount =
tempVals
-- Now
animation
v =
v < 0
incVal = -0.1
Animate
plotValues
chart one
buttonUp
buttonDoubleClick
plotValues
"chart one"
ZData
(200) - 100
100,-6,13,-60,-37,71
plotValues
chart one
buttonUp
plotValues
"chart one"
0.1, 0.2, 0.3, 0.4, 0.5, 0.6
plotValues
chart one
buttonUp
plotValues
"chart one"
.1, -.5
plotValues
chart one
buttonUp
plotValues
"chart one"
23.45, 16.78, 12.34
Chart one
1,0.7155650319829424,0.5262260127931769
defValues
barWeight
BarChart
tbk_wid_name
PlotValues
PlotWeight
PlotColors
tbk_wid_props
tbk_wid_values
myPlotWeight
magenta,cyan,yellow,red,blue,green
myPlotColors
plotWeight
Chart one
buttonUp
plotWeight
"Chart one"
Bar Weight::
enterPage
author
reader
Simple Line Chart
Graph widgets
chapter
chapterID
FALSE
visited
Group id 23 of Page id 144
widgets
This widgets plots up to 6 series of up to 25 points each. Just set its plotValues property to the data you want. Other properties control appearance details.
Set plotValues of the chart to a string containing as many as 6 textlines containing up to 25 numbers each. Values should be floating point numbers between -1 and 1, or any number. If a value exceeds -1 or 1, the values in the series will be normalized so that the highest one is assumed to be as high as the chart will allow. You can use any number of values but at least 2 and no more than 25 in any textline of the data.
Example: set plotValues of group "Chart One" to "100,200,400,200" & CRLF & "123,345,523,234"
Set plotWeight of the group to a relative thickness for the lines. This should be a number between 1 and 100.
Example: set plotWeigth of group "Chart One" to 60
Note: The chart gets redrawn with the current values when you change the plotWeight.
Set plotColors of the group to up to 6 HLS color values or color names.
Example: set plotColors of group "Chart One" to "green,magenta,red,blue, 34,56,75, 78,56,35"
The line chart widget does not include marker lines. However, the bounds of the widget effectively define the plotting area, and the y = 0 line is a virtual horizontal line that goes exactly through the middle of the widget. The plotting area gets automatically hidden or shown when switching from reader to author level.....
This pie chart can plot up to 6 different values. The various buttons on this page change properties of the widget.
Set plotValues of the group to up to 6 numbers. The numbers will be automatically normalized to add up to 100%. You can use any number of values but at least 2 and no more than 6 (to show more values, see below.)
Example: set plotValues of group "Chart One" to "1000,2000,4000,2000"
Note that the chart will still be plotted correctly even if it is not perfectly round. However, since the size of the pies is calculated by angle, not by surface, this can lead to a distorted view of the data.
Set plotOrigin of the group to a value in degrees which must be a number from 0 to 360.
Example: set plotOrigin of group "Chart One" to 45
Note: The chart gets redrawn with the current values when you change the plotOrigin.
Set plotColors of the group to up to 6 HLS color values or color names.
Example: set plotColors of group "Chart One" to "green,magenta,red,blue, 34,56,75, 78,56,35"
To plot more than 6 values, select the group, double-click it to select one of the pie objects inside, and use the clipboard to copy and paste as many copies of the pie object as you need inside the group. Set the color of the pies as you go, or set the plotColors property to your liking. Note that adding pies to this widget will slow it down..
Chart One
X j 6
Claude
authorName
startangle
false
fullpie
zeroAngle
6083, 4186, 5092, 9511, 3934, 3375
defValues
1540.5
vRadius
yCenter
2287.5
xCenter
PieChart
tbk_wid_name
PlotValues
PlotOrigin
PlotColors
tbk_wid_props
tbk_wid_values
myPlotOrigin
magenta,cyan,yellow,red,blue,green
myPlotColors
plotValues
chart one
buttonUp
-$, #>
buttonDoubleClick
plotValues
"chart one"
Zdata
(5) + 1
6083, 4186, 5092, 9511, 3934, 3375
plotValues
chart one
buttonUp
buttonDoubleClick
plotValues
"chart one"
Zdata
(5) + 1
(10)
10,6,1,7,10
plotValues
chart one
buttonUp
buttonDoubleClick
plotValues
"chart one"
Zdata
(5) + 1
(10) / 10
%" 0.0"
0.9, 0.9, 0.5, 0.6, 0.8, 0.2
chart one
plotOrigin
buttonUp
plotOrigin
"chart one"
chart one
plotOrigin
buttonUp
plotOrigin
"chart one"
chart one
plotOrigin
buttonUp
plotOrigin
"chart one"
chart one
plotOrigin
buttonUp
plotOrigin
"chart one"
chart one
plotOrigin
buttonUp
plotOrigin
"chart one"
plotColors
blue,red,green,magenta,cyan,yellow
chart one
buttonUp
plotColors
"chart one"
Color Scheme 1
plotColors
magenta,cyan,yellow,red,blue,green
chart one
buttonUp
plotColors
"chart one"
Color Scheme 2
.&+ +E
.&+ +E
Chart One
plotOrigin
buttonUp
plotOrigin
"Chart One"
FALSE
Exploded pie chart
Graph widgets
chapter
chapterID
FALSE
visited
Group id 3 of Page id 146
widgets
This pie chart shows two values only. One of the values gets plotted as an "exploded" wedge. The animation examples simply set properties of the widget.
Set plotValues of the group to two numbers. The numbers will be automatically normalized to add up to 100%. The second number will be shown in the "exploded" slice.
Example: set plotValues of group "Chart One" to "10000,2000"
Note that the chart will still be plotted correctly even if it is not perfectly round. However, since the size of the pies is calculated by angle, not by surface, this can lead to a distorted view of the data.
Set plotOrigin of the group to a value in degrees which must be a number from 0 to 360, and a second number specifying the distance (in ToolBook units) by which to move the exploded slice.
Example: set plotOrigin of group "Chart One" to 45, 150
Note: The chart gets redrawn with the current values when you change the plotOrigin.
Set plotColors of the group to HLS color values or color names for the two slices.
Example: set plotColors of group "Chart One" to "green, 78,56,35"
Chart One
explodeBy
Claude
authorName
startangle
false
fullpie
zeroAngle
defValues
1540.5
vRadius
yCenter
2287.5
xCenter
ExplodedPieChart
tbk_wid_name
PlotValues
PlotOrigin
PlotColors
tbk_wid_props
tbk_wid_values
blue,red,green,magenta,cyan,yellow
myPlotColors
plotValues
chart one
plotOrigin
buttonUp
plotValues
"chart one"
plotOrigin
150,240
plotValues
chart one
buttonUp
plotValues
"chart one"
plotValues
chart one
buttonUp
chart one
plotOrigin
buttonDoubleClick
plotValues
"chart one"
Zdata
(10)
plotOrigin
(360 - 1),
(180) + 120
chart one
plotOrigin
buttonUp
plotOrigin
"chart one"
chart one
plotOrigin
buttonUp
plotOrigin
"chart one"
chart one
plotOrigin
buttonUp
plotOrigin
"chart one"
chart one
plotOrigin
buttonUp
plotOrigin
"chart one"
chart one
plotOrigin
buttonUp
plotOrigin
"chart one"
plotColors
blue,red,green,magenta,cyan,yellow
chart one
buttonUp
plotColors
"chart one"
Color Scheme 1
plotColors
magenta,cyan,yellow,red,blue,green
chart one
buttonUp
plotColors
"chart one"
Color Scheme 2
.&+ +E
.&+ +E
Chart One
plotOrigin
buttonUp
plotOrigin
"Chart One"
.&+ +E
.&+ +E
false
Chart One
plotOrigin
buttonUp
odone
plotOrigin
"Chart One"
i,i*2
Animate
.&+ +E
.&+ +E
explodeAngle
false
Chart One
plotOrigin
plotOrigin
buttonUp
odone
explodeAngle
plotOrigin
"Chart One"
false
Animate
Select Topic
Alpha Keyboard
copyDialog
copyDialog
cBRef
initDialog
keyChar
initDialog textString
cBRef
comboBox "copyDialog"
dropDownItems
keyEnter
buttonClick
B"OK"
FALSE
visited
Select Widget
s_currentCopy
copyDialog
buttonClick
keyChar
buttonClick
4s_currentCopy
comboBox "copyDialog"
close
keyEnter --
enter
%alias
spacebar
buttonclick
FALSE
copyDialog
Group "Date"ageName"tons"er"ns"ield Widgets
Slider Widgets
CBT Widgets
Keyboards
Miscellaneous3
Group "Date"
Group "Integer"
Group "Time"
Field "autoTime w/ timer"
Field "LeaveField_Whitespace"
der Widgetsdgets
Cancel
s_currentTopic
copyDialog
buttonClick
buttonClick
4s_currentTopic
"copyDialog"
close
Cancel
copyDialog
Useful Patterns
Scale Slider
Simple Bar Chart
Calendar
Data widgets
chapter
chapterID
Group id 61 of Page id 80
widgets
FALSE
visited
A calendar that keeps itself current.
This widget automatically shows the current date, and can be set to show any month in the years 1700 to 2100. Enough functionality is provided to make the scripts easily extensible.
calendar
calendar
tbk_wid_name
field "23"
resetObj
frame
calYear
HSbuildcal
frame
whatDate
sCurrentMonth
m d y
sCurrentYear
selectChange
selectChange whatText
4sCurrentMonth, sCurrentYear
whatDate =
%"m d y"
= TRUE
buildcal
"frame"
= FALSE
1994c
d 1700
calMonth
HSbuildcal
frame
whatDate
sCurrentMonth
m d y
sCurrentYear
selectChange
selectChange whatMonth
4sCurrentMonth, sCurrentYear
whatDate =
%"m d y"
= TRUE
buildcal
"frame"
= FALSE
Junel 4 109
January 1
February 2
March 3
April 4
May 5
June 6
July 7
August 8
September 9
October 10
November 11
December 124
today
HSbuildcal
m,d,y
displayDate
sCurrentDay
sCurrentMonth
mydate
sCurrentYear
buttonClick
buttonClick
4sCurrentMonth, sCurrentYear, sCurrentDay
mydate =
%"m,d,y"
= TRUE
displayDate
buildcal
= FALSE
Field id 83 of Page id 2
lastObj
strokcolor
strokcolor
enterPage
FALSE
Scale Slider
Slider widgets
chapter
chapterID
FALSE
visited
Field id 67 of Page id 81,Group id 66 of Page id 81
widgets
A sophisticated slider with a number of properties you can edit..
The slider widget below sends the following messages:
startSliderMove: sent when the user first clicks on the thumb
sliderMove: sent constantly as the slider is being dragged
endSliderMove: sent when the user releases the thumb.
Each of these messages includes the current position of the slider thumb as its parameter.
You can set or get the following properties of the slider.
sliderMin: Minimum value for the slider
sliderMax: Maximum value for the slider
sliderPos: Position of the thumb
numTics: Number of tic marks that appear on the scale (max 50)
tallTicSpacing: Frequency of tall tics on the scale. Each tall tic has a label below it. (up to 10 labels)
These properties are easily accessed through the property browser in the tools30.sbk. box.
slider
mySliderMin
mySliderMax
mysliderPos
myNumTics
scaledSlider
tbk_wid_name
numTics
tallTicSpacing
sliderMin
sliderMax
sliderPos
tbk_wid_props
tbk_wid_values
myTallTicSpacing
thumb
hSliderThumb
txClassName
button id 103 of page id 15
glide
width
false
hilight
myTrackPos
Shuttle
helptext
Button
100066666666666673
200033333333333344
30000000000000001e-014
40006666666666669
50003333333333336
60000000000000001
10000
emitter
#00.00
sliderMove
notifyAfter sliderMove pos
arbitrary precision, comment the
adjust
zeros
tpoint
%"#00.00"
integers
scale_emitter
tbk_wid_name
49.68569620253169
The field below uses a notify handler to trap the sliderMove message.
startSliderMove
sliderMove
endSliderMove
sliderMove
FALSE
Printer Resolution
FALSE
visited
Data widgets
chapter
chapterID
Button id 0 of Page id 86
widgets
This widget can find out the resolution of the printer
Windows allows us to learn about the way a device displays information by creating an "Information Context". We use the API calls "createIC" and "getDeviceCaps" with the name of the printer (retrieved from the win.ini). This method is capable of finding out just about anything you want to know about your printer or your display monitor.your display monitor.
PrinterRes
tbk_wid_name
&Printer Resolution
FALSE
International time and date
Data widgets
chapter
chapterID
FALSE
visited
Field id 3 of Page id 141,Field id 2 of Page id 141
widgets
These fields display the current date and time in the current international format.
These widgets are just like the previous "Auto Date" and "Auto Time" widgets except that they determine their formats by referring to the sysIDate and sysITime international system properties.
autoDate
myDate
dd/mm/yy
yy/mm/dd
mm/dd/yy
enterPage
notifyBefore
myDate =
sysIDate
%"dd/mm/yy"
%"yy/mm/dd"
%"mm/dd/yy"
autoDate
tbk_wid_name
format
borderStyle
tbk_wid_props
list,none,rectangle,shadowed,inset,raised
tbk_wid_values
mm/dd/yy
prop_format
20/06/9440, 1993
autoTime
SetTimer
widTimerStart
KillTimer
widTimerEnd
period
hfwidTimerStart
clockTick
:timerID
enterPage
widTimerEnd
:timerID
leavePage
hh24:min:sec
clockTick
h:min:sec
:timerID
clockTick
notifyBefore
linkDLL "user"
WORD widTimerStart=SetTimer(
,DWORD)
+End = KillTimer(
translateWindowMessage
windowHandle
on 0x0113
clockTick
otimerID
operiod * 1000, 0)
notifyAfter
widTimerEnd(
unlinkDLL "
hWnd, msg,
sysITime = 1
%"hh24:
j:sec"
autoTime
tbk_wid_name
format
borderStyle
period
tbk_wid_props
list,none,rectangle,shadowed,inset,raised
tbk_wid_values
h:min:sec AMPM
prop_format
period
timerID
16:23:09PMM
International date:
International time:
enterPage
leavePage
FALSE
<+U!8
Use this command to edit a widget.
Clear the check marks from the table of contents and all the topic pages.
widgetSchmidget
false
Use this command to check the properties of a widget.
Clear Chec&ks
object
E&dit Widget Properties...
splash
FALSE
statusBar
Contents
checkWids
s_widFirstFlag
readerFix
resetChecks
:widHelp
widgetHelp
s_backMessageSent
book outline
C&heck Widget...
enterApplication
leaveApplication
s_widFirstFlag
.&, "
.&, "
contentBar
Widget Label
Bwidgets
Bwidgets
Widget:
tbk_wid_name
Widgets:
enterPage
checkWids
reader
newViewer
widgetSchmidget
FALSE
author
myPaste
localWids
Bwidgets
CopyAll
myCopy
tbk_wid_name
Object
enterMenu
Author
previous
nextBG
stringResource
previousBG
ainitPage
widgetHelp
HelpIntro
menuItemSelected
s_backMessageSent
leavePage
s_backMessageSent
You are all the way back.
contentBar
keyDown
contentBar
keyUp
authorFix
book outline
author
book outline
readerFix
reader
statusBar
initPage
w, #>
,%H.%
w, #>
widObs
You can paste it into another ToolBook application.
initDialog
contentBar
s_currentCopy
copyDialog
stringResource
Bwidgets
The widget
tbk_wid_name
CopyWidget
has been copied to the clipboard.
myCopy
.&+ +E
.&+ +E
BadPaste
You must use the authoring version of ToolBook to paste in new widgets.
stringResource
widgetSchmidget
ainitPage
newWidget
myPaste
have been copied to the clipboard.
You can paste them into another ToolBook application.
Bwidgets
The widgets of this page
copyAll
table Of Contents
tableofcontents
updatechecks
tableOfContents
.&+ +E
w, "V
.&+ +E
.&+ +E
.&+ +E
.&+ +E
w, "V
.&+ +E
cancel
7WrealName
g)updateTopics
widPage
contentBar
NeedHeading
s_currentTopic
book outline
nameOfWidget
y5chapter
Topics
????????
comboRef
stringResource
noName
topics
heading
chapterID
Select Topic
newName
select topic
miscellaneous
myPageList
TooManyWidgets
autoPageName
widgetIDs
newWidget
splash
about
stringResource
widgetHelp
statusBar
mouseEnter
statusBar
mouseLeave
,%H.%
8initDLG
reader
tempWid
group
initDialog
locWids
needWidgetToEdit
s_currentCopy
copyDialog
widgetProperties
stringResource
Bwidgets
Bwidgets
ChooseWidgetToEdit
untitled
widgetSchmidget
,%H.%
w, #?
w, #?
1, "Q
1, "Q
,%H.%
1, #>
,%H.%
Cancel
needWidget
askTWName
POtbk_wid_props
wName
rptbk_wid_values
ChooseWidgetToCheck
to set
temp2
group
s_currentCopy
learnProps
copyDialog
tabStops
setProps
Bwidgets
Bwidgets
noPubProp
initDialog
tbk_wid_name
tbk_wid_name
stringResource
convToSet
Any data accepted
checkWids
.&+ +E
,%H.%
.&+ +E
FALSE
Cvisited
topics
Table of Contents
TableofContents
updateChecks
resetChecks
9@darkBlue
Please enter a widget name for the object.
Please copy a widget to the clipboard before performing this operation.
No, don't do it
NeedHeading
about
Please either delete some of this topic's widgets or create a new topic.
You can set the properties of this widget in the left-hand column
Do you want to repage the book now, or wait until you are done adding and clearing widgets and topics?
Please either choose a topic or create a new one.
learnProps
If you want to use this page, paste the widget from author mode.
NoName
Please choose a widget in the outline field that you want to delete.
In Reader Mode:
ver. 1.01
What is the name of your widget?
NoDont
Sorry, this feature is not yet implemented.
What the clipboard contains is not a widget, it is probably text.
This topic already has the maximum allowable number of widgets (20).
MustCreatetopicName
Repage
Clearing the book will cause the irretrievable loss of data.
Topics are at the outer level of the outline and widgets are at
ChooseWidget
You need a widget to check. Navigate to the widget you want and try again.
askTWName
This object doesn't have it's tbk_wid_name property set.
button, or double click the chosen textline.
nameOftopic
Are you sure you want to do this?
clearTopic
to reset various structures in the book. You can also clear out the whole
To continue, please delete some of these topics.
Yes, I'm Sure
the structure of the book. You can add and delete topics and widgets.
YesSure
clearBookWarning
NotImplemented
No help yet for this item.
convToSet
This widget has no published properties
selectNotBGRF
needWidgetToEdit
the inner level. Choose a topic or a widget and click on the "Go"
NoHelp
HelpIntro
Use the outline to navigate to any topic or widget.
TopicToDelete
Intro to Widgets
wName
Error occurred in string fetch, unknown key word.
Please select an object not on the background and not a recordField.
BadPaste
can't create this widget.
noPubProp
To learn more about these user properties, see the widgets help in this book.
(tbk_wid_props and tbk_wid_values) associated with it.
Select a Widget To Copy
WidgetNotTopic
TooManyTopics
nameOfWidget
You can rearrange the outline by dragging textlines up and down.
to the type in the right-hand column:
What is the name of your new topic?
LastWidget
This book already has the maximum allowable number of topics (16).
repage
For best results, check the "Exclude Background Fields" in the default dialog box that will appear.
Please pick a widget to clear, not a topic.
setProps
Select a Widget to Check.
Cancel
needWidget
You need a widget to edit. Navigate to the widget you want and try again.
The Widgets Book
Select a Widget to Edit.
CopyWidget
ChooseWidgetToCheck
ChooseWidgetToEdit
Close
(You should repage before you try to navigate after adding or deleting widgets and topics. If you don't, errors may result.)
book in case you want to use this structure as a shell for your own book.
No name is associated with this widget,
You must create a topic name. Please start again.
PageOutlineHelp
The widget name of this object is
You will need to clear out the widgets belonging to this topic before you can delete the topic.
This is the last widget in this book, and can not be deleted.
This widget will need a topic heading.
In Author Mode:
Asymetrix 1994
TooManyWidgets
Reader mode functionality is still available, but you can also edit
Consider converting these "to set" handlers into published properties of this widget:
After editing, it is a good idea to click the "Repage" button in order
Please select a topic in the outline field to delete.
doRepage
stringResource
Last page of this background
nextPage
Create a new topic
Clear a widget
outlineHelp
help_text
clearBook
keyWord
yhelpText
clearTopic
lastPage
outline
repaginate
previousPage
topics
Go to heading page for current topic.
Previous page (w/ ctrl key = Previous page of this background)
clearWidget
createWidget
Repaginate the book and reset the check marks
First page of this background
Create a new Widget
tableOfContents
Next page (w/ ctrl key = Next page of this background)
[helpText not yet cached]
First page of this topic (w/ ctrl key = First page of this background)
Go to page topic table of contents.
Show outline viewer and book editor.
Clear a topic
firstPage
Clear all topics and widgets from the book
createTopic
Last page of this topic (w/ ctrl key = Last page of this background)
Error occurred while getting help text, unknown key word.
Help for using the outline viewer and book editor.
widgetHelp
widgetProperties
in,none
ThreeDeeRect
bottomLine
topLine
&Widget Name:
in,ms
ThreeDeeRect
bottomLine
topLine
widname
ExplodedPieChart
P&roperties:
bottomLine
topLine
proplist
PlotValues text
PlotOrigin text
PlotColors text
allcontrols
&Method:
edittype
proplist
options
updateFromDB
custom
selectChange
selectChange
"custom"
mode
"options"
updateFromDB
"proplist"
Fieldown List
Dropdown List
Field
Custom
Custom
options
dropdown list
field
custom
dropDown List
logical
mode
value
"dropDown List"
"dropdown list"
"logical"
"custom"
field
field
proplist
updateFromDB
selectchange
selectchange
updateFromDB
"proplist"
Accept any datanly
Accept any data
Read onlybers only
Read only
Data Constraints:
dropdown list
.&+ +
proplist
updateFromDB
false
listItems
listitems
eupdateButtons
logical
@origVal
buttonclick
buttonclick
B"logical"
enabled
"list"
"listitems"
origVal
"listItems"
selectedtextlines
updateButtons
updateFromDB
"proplist"
buttonClick
logical
Lo&gical
&List of Values
in,ms
ThreeDeeRect
bottomLine
topLine
listitems
editVal
delVal
updateButtons
updateButtons
enabled
B"editVal"
B"delVal"
false
newVal
cancel
updateFromDB
propList
listitems
eupdateButtons
Enter a new item:
@origval
buttonclick
buttonclick
ZnewProp
("Enter a
newprop
fref =
"listitems"
t =
origval
updateButtons
selectedTextLines
updateFromDB
"propList"
buttonClick
&New...
delVal
propList
updateFromDB
listitems
eupdateButtons
@origval
buttonclick
buttonclick
fref =
"listitems"
stl = selectedTextLines
updateFromDB
"propList"
origval
selectedTextlines
tlc =
updateButtons
&Delete
EditVal
Edit the Property Value
cancel
propVal
listitems
@origval
buttonClick
buttonClick
fref =
"listitems"
stl = selectedTextLines
propVal =
("Edit the Property Value"
origval
&Edit...
custom
F&unction Name:
in,ms
ThreeDeeRect
bottomLine
topLine
custom
propList
updateFromDB
leaveField
updateFromDB
"propList"
editWidget
values
Property Browser Editing:
cancel
propList
G[updateDB
Enter a new property name:
buttonclick
buttonclick
ZnewProp
("Enter a
qproperty
newprop
fref =
"propList"
t =
selectedTextLines
updateDB
buttonClick
&New...
mainEdit
proplist
cancel
Edit the Propery Name.
propName
buttonClick
buttonClick
fref =
"proplist"
stl = selectedTextLines
t =
tabloc =
9,t)-1
propName=
("Edit the Propery
Ed&it...
mainDelete
proplist
G[updateDB
buttonClick
buttonClick
fref =
"proplist"
stl = selectedTextLines
selectedTextlines
tlc =
updateDB
&Delete
updateWidget
buttonClick
buttonClick
updateWidget
buttonclick
buttonclick
close
buttonClick
Cancel
widgetProperties
splash
stringResource
about
buttonDoubleClick
stringResource("about")
Widgets
Useful Stuff for
ToolBook Authors
1994 Asymetrix Corp.
ver. 1.01
buttonClick
Cancel
widgetProperties
splash
Can't touch this
Cant_Touch_This
enterPage
B"Cant_Touch_This"
orig
Miscellaneous
chapter
FALSE
visited
chapterID
Button id 0 of Page id 64
widgets
3269,3928
The descendant of a practical joke, this widget suggests some possibilities for using ToolBook to create interactive games.
Cant_Touch_This
1,$!2
mouseEnter
-- Tim Pearson, Asymetrix 1/94
Z INT xOld, yOld, xMin, yMin, xMax, yMax, x, y
/= "0,0"
x =
x >= 0
xTRUE
y =
y >= 0
Cant_Touch_This
tbk_wid_name
Can't Touch This
FALSE
Widget help
66,67,68,69,70
widgetIDs
66,67,68,69,70
Widget Help
Intro to widgets
Widget help
chapter
chapterID
FALSE
visited
Button id 0 of Page id 66
widgets
Click the button below to learn more about widgets.
Widgets are stand-alone objects that can be copied and pasted into your applications. In most cases they are designed to work without modification of any scripts.
While ToolBook and OpenScript have no "widgetry" built into them, there are enough features available that, among the OpenScript programmers at Asymetrix, we have developed a convention and a protocol for making widgets.
Widget Talk
Widget Talk
tbk_wid_name
GROUPBOX Welcome,G23,Welcome to Widget Talk
BUTTON Basic Widgets,B18,TRUE
BUTTON Notify Messages,B19,TRUE
BUTTON Init and Cleanup,B20,TRUE
BUTTON Advanced Widgetry,B21,TRUE
BUTTON Close,B22,TRUE
WidgetHelpInit
524480,6,25,25,172,93,,,Widget Help,8,MS Sans Serif,Welcome,14,2,150,55,23,1342177287,128,Welcome to Widget Talk,0,Basic Widgets,19,19,70,12,18,1342242816,128,&Basic Widgets,0,Notify Messages,19,36,70,13,19,1342242816,128,&Notify Messages,0,Init and Cleanup,91,19,70,13,20,1342242816,128,&Init and Cleanup,0,Advanced Widgetry,91,36,70,13,21,1342242816,128,&Advanced Widgetry,0,Close,67,64,43,14,22,1342242817,128,&Close,0
WidgetHelpBox
GROUPBOX Basic Widgets,G26,Basic Widgets
BUTTON More,B29,TRUE
BUTTON Back,B30,TRUE
BUTTON Cancel,B31,TRUE
STATIC Basic Text,S32,A widget has two basic properties:
1) It can be copied and pasted and be completely functional without modification
2) It has a user property "tbk_wid_name" set to some reasonable text value, and used for purposes of identification by tools30.sbk.
BITMAP baswid,p33,bitmap "baswid"
BasicWidgetInit
524480,6,25,25,186,193,,,Basic Widgets,8,MS Sans Serif,Basic Widgets,11,5,167,149,26,1342177287,128,Basic Widgets,0,More,15,161,52,14,29,1342242816,128,&More,0,Back,69,161,51,14,30,1342242816,128,&Back,0,Cancel,123,161,50,14,31,1342242816,128,&Cancel,0,Basic Text,24,22,148,56,32,1342177280,130,Text,0,baswid,31,75,114,71,33,1342177280,TBKDLGBitmap,bitmap "baswid",0
BasicWidgetBox
GROUPBOX Notify Messages,G39,Notify Messages
BUTTON More,B35,TRUE
BUTTON Back,B36,TRUE
BUTTON Cancel,B37,TRUE
STATIC Notify Message,S38,Notify messages are useful for letting the widget know what is going on without modifying any scripts
BITMAP Notify,p43,bitmap "Notify"
NotifyMessagesInit
524480,6,25,25,170,166,,,Notify Messages,8,MS Sans Serif,Notify Messages,9,4,153,125,39,1342177287,128,Notify Messages,0,More,17,136,47,14,35,1342242816,128,&More,0,Back,67,136,42,14,36,1342242816,128,&Back,0,Cancel,113,136,43,14,37,1342242816,128,&Cancel,0,Notify Message,16,15,141,28,38,1342177281,130,Text,0,Notify,17,45,141,78,43,1342177280,TBKDLGBitmap,bitmap "Notify",0
NotifyMessagesBox
GROUPBOX Init and Cleanup,G39,Initialization and Cleanup
BUTTON More,B35,TRUE
BUTTON Back,B36,TRUE
BUTTON Cancel,B37,TRUE
STATIC Init and cleanup,S38,We can use "notifyBefore copy" handlers to initialize the widget as it is being copied, and possibly to initialize the book it is being pasted into.
We can also use "notifyAfter paste" or "notifyAfter make" handlers to initialize and cleanup the new widget
InitandCleanupInit
524480,5,25,25,169,127,,,Init and Cleanup,8,MS Sans Serif,Init and Cleanup,9,4,153,85,39,1342177287,128,Initialization and Cleanup,0,More,17,96,47,14,35,1342242816,128,&More,0,Back,67,96,42,14,36,1342242816,128,&Back,0,Cancel,112,96,43,14,37,1342242816,128,&Cancel,0,Init and cleanup,14,16,145,68,38,1342177280,130,Text,0
InitandCleanupBox
GROUPBOX Advanced Widgetry,G39,Advanced Widgetry
BUTTON More,B35,TRUE
BUTTON Back,B36,TRUE
BUTTON Cancel,B37,TRUE
STATIC Advanced,S38,Tools30.sbk knows quite a bit about widgets. It can tell if an object is a widget when that object has the user property "tbk_wid_name" set to some value. It also knows about two other properties:
1) tbk_wid_props is a carriage-return line-feed delimited list of properties (user properties) that the widget has and that can be initialized and set according to the parameters of property # 2.
2) tbk_wid_values is a CRLF list with the same number of textlines as tbk_wid_props. Textlines in the two properties correspond. The first item of each textline in tbk_wid_values declares what kind of values the property can take. This can be any of "custom,text,list,boolean,na." The next items in the list will be the legal values for that property.
AdvancedInit
524480,5,25,25,237,189,,,Advanced Widgetry,8,MS Sans Serif,Advanced Widgetry,11,5,215,146,39,1342177287,128,Advanced Widgetry,0,More,46,157,47,14,35,1342242816,128,&More,0,Back,98,157,42,14,36,1342242816,128,&Back,0,Cancel,143,157,43,14,37,1342242816,128,&Cancel,0,Advanced,21,20,203,121,38,1342177280,130,Text,0
AdvancedBox
Book "C:\TBEA\SAMPLES\WIDGETS\WIDGT78B.TBK"
oldBook
GROUPBOX Basic Widgets,G26,Basic Widgets
BUTTON More,B29,TRUE
BUTTON Back,B30,TRUE
BUTTON Cancel,B31,TRUE
STATIC Basic Text,S32,A widget has two basic properties:
1) It can be copied and pasted and be completely functional without modification
2) It has a user property "tbk_wid_name" set to some reasonable text value, and used for purposes of identification by tools30.sbk.
BITMAP baswid,p33,
BasicWidgetsInit
524480,6,25,25,186,193,,,Basic Widgets,8,MS Sans Serif,Basic Widgets,11,3,169,154,26,1342177287,128,Basic Widgets,0,More,15,164,53,14,29,1342242816,128,&More,0,Back,70,164,52,14,30,1342242816,128,&Back,0,Cancel,124,164,50,14,31,1342242816,128,&Cancel,0,Basic Text,24,22,149,57,32,1342177280,130,Text,0,baswid,31,76,115,72,33,1342177280,TBKDLGBitmap,,0
BasicWidgetsBox
Widget Talk
FALSE
Intro to Widgets
International time and date
Basic widgets
Widget help
chapter
chapterID
FALSE
visited
Here are a few pointers on how to make a widget.
You may want to develop your own style for creating widgets, but keep the pointers listed below in mind. Some techniques will work fine in one book, but can cause problems when the widget is pasted into another book.
Set tbk_wid_name of the widget to the name of the widget. This allows the widget to be recognized by tools30.sbk
Use notify handlers.
Try to link and unlink dlls to guarantee their availability. ToolBook increments a reference count every time a dll is linked, and decrements it when the dll is unlinked. ToolBook doesn't unload the library or any of its functions until the reference count goes to zero.
Use user properties and "to set" and "to get" handlers.
Restore the system. It will clobber everything!
Use common names like "s_myName" in your system variables. You may clobber or be clobbered. Try using names unlikely to be used elsewhere.
Use system variables at all. This is very safe. Try setting and getting user properties of the widget.
y setting and getting user properties of the widget.
Don'ts
Don't
FALSE
Basic Widgets
dgetsx
Notify messages
Widget help
chapter
chapterID
FALSE
visited
Field id 7 of Page id 68,Field id 6 of Page id 68,Field id 4 of Page id 68
widgets
Use notifyBefore and notifyAfter handlers to activate widgets when built-in ToolBook messages are sent.
The examples below use various messages to make sure they display the correct data. The first clock uses enterPage to set a timer, and leavePage to stop the timer. The second clock uses the idle message.
The autoPageName example uses the enterPage message to determine the current page name. It is identical to the background field at the upper-left corner of this page.
Other useful messages to write notify handlers for include enterApplication, enterBook, enterBackground, other enter event messages and all of their corresponding leave event messages. It's also useful to write notify handlers for custom messages you design into your application.
autoTime w/ timer
autoTime
tbk_wid_name
format
borderStyle
period
tbk_wid_props
list,none,rectangle,shadowed,inset,raised
tbk_wid_values
h:min:sec AMPM
prop_format
period
timerID
1:52:45 PMM
autoTime w/ idle
enterPage
h:min:sec AMPM
seconds
s__autoTimeWithIdle
h:min:sec AMPM
seconds
s__autoTimeWithIdle
s__autoTimeWithIdle
leavePage
notifyBefore
notifyAfter
4s__autoTimeWithIdle
j:sec AMPM"
autoTimeWithIdle
tbk_wid_name
1:52:46 PMM
autoPageName
6Wrealname
enterPage
notifyBefore
realname
autoPageName
tbk_wid_name
tbk_wid_values
Notify messagessnd Cleanupters
autoTime with timer:
autoTime with idle:
autoPageName
autoPageName:
enterPage
leavePage
leavePage
FALSE
Initialization and cleanup
Widget help
chapter
chapterID
FALSE
visited
Field id 0 of Page id 69
widgets
You can use notify messages to prepare the widget or the book it is being copied to.
To prepare the widget to be copied, use the following:
notifyBefore copy
To prepare the book the widget is copied to and to clean up the widget, use the following:
notifyAfter make
if target is self
testWidget
Toggle
testWidget
tbk_wid_name
Book "C:\TBEA\SAMPLES\WIDGETS\PROBLEM\WIDGT75E.TBK"
oldBook
This field has a graphic in it.
Try clicking it. a graphic in it.
testWidget
buttonClick
buttonClick
"testWidget"
&View Script
To make sure we get all the graphic resources this field needs, we will need to copy them to the book we are going to paste the field into. We use the "notifyBefore copy" handler to find out the name of the book we are coming from, and "notifyAfter make" to copy the resources into the new book.
FALSE
Advanced widgetry
Widget help
chapter
chapterID
FALSE
visited
Group id 170 of Page id 70
widgets
Tools30.sbk recognizes certain properties as belonging to widgets. When you use these properties, tools30.sbk will enable you to edit the widget.
The tools30.sbk protocol:
"tbk_wid_name" is the name of the widget.
"tbk_wid_props" are properties of the widget.
"tbk_wid_values" corresponds to tbk_wid_props.
The first item in each textline of tbk_wid_values describes a type for the property, the rest of the line are the legal values for that property.
Tools30.sbk understands the following types of properties:
text: anything can go in here
boolean: true or false
list: a list of possible values
color: RGB or HLS value
multiLine: text or richText
font: text, name of font
custom: message to send
NA: not available to edit
You write handlers for the custom messages. Double clicking the line for the custom message in the property browser of tools30.sbk sends that message to the widget.
All of these methods together provide a powerful scheme for giving the user access to the widget. Yet, the user is still constrained from making unreasonable choices.
One useful strategy is to have the custom message call a dialog (built with dialog.tbk, of course) that sets the various properties.
The widget below, based on the MIDI keyboard, combines these ideas. In reader mode, the user goes directly to the dialog box from the Custom edit choice in the right-click tool bar. At Author level, by choosing Custom edit from the group's right click tool bar, the user goes to the tools30.sbk property browser. From there, the properties can be set individually, or the dialog can be set by doubleclicking the custom message.....goes to the tools30.sbk property browser. From there, the properties can be set individually, or the dialog can be set by doubleclicking the custom message.
om message. menu, at author it is in the "object" menu.
524480,14,25,25,138,134,,,Dialog,8,MS Sans Serif,,3,3,76,38,3596,1342177287,128,Keyboard Settings,0,,3,43,77,74,3599,1342177287,128,MIDI Settings,0,,8,55,37,10,3604,1342177280,130,Text,0,,8,70,37,10,3605,1342177280,130,Text,0,,8,86,37,10,3606,1342177280,130,Text,0,,8,101,37,10,3607,1342177280,130,Text,0,gliss,8,15,48,9,3602,1342242819,128,&Gliss,0,sustain,8,27,48,9,3603,1342242819,128,&Sustain,0,program,46,54,27,121,3608,1350631491,133,,0,volume,46,69,27,121,3609,1350631491,133,,0,channel,46,84,23,66,3610,1350631491,133,,0,device,46,99,23,44,3611,1350631491,133,,0,ok,85,8,47,13,1,1342242817,128,OK,0,cancel,85,24,47,13,2,1342242816,128,Cancel,0
dlgBox
gliss
sustain
program
volume
channel
device
You can also edit these properties using the "Edit Widget Properties" menu item. You can do a quick check of a widget with the "Check Widget" menu item. At reader these are in the "edit" menu, at author, the "object" menu.
menu.
customEdit
FALSE
Alpha keyboard
Keyboards
chapter
chapterID
FALSE
visited
Group id 27 of Page id 72
widgets
The group recognizes which button has been pressed.
Pressing a button causes the group to report to the user what button was pressed. The invert property of that button is set to true until the next button is pressed. When pasted into another book, the buttons are all reset and the group is prepared to work without any manual initialization.
alphabuttons
Button id 10 of Page id 72
buttonPressed
alphabuttons
tbk_wid_name
Button id 10 of Page id 72
invertedButton
FALSE
MIDI keyboard
Keyboards
chapter
chapterID
FALSE
visited
Group id 171 of Page id 76
widgets
This control sends MIDI messages to the MMSystem DLL, bypassing the MCI drivers. You must have a sound card to hear anything.
By sending messages directly to the DLL, the user is given much more precision.
You can use the Ctrl key somewhat like the sustain pedal on a piano. Pressing Ctrl+Shift when you click a key acts as a MIDI "panic button" and shuts off any keys that might be ringing.
You can set parameters using the Custom edit button on the right-click tool bar for any of the keys or the group "keyboard."
If you are in author mode, you can set these same parameters from the tools30.sbk system book using the customEdit button in the rightClick menu or by selecting the keyboard group and choosing "Property Browser" from the Tools menu.
524480,14,25,25,138,134,,,Dialog,8,MS Sans Serif,,3,3,76,38,3596,1342177287,128,Keyboard Settings,0,,3,43,77,74,3599,1342177287,128,MIDI Settings,0,,8,55,37,10,3604,1342177280,130,Text,0,,8,70,37,10,3605,1342177280,130,Text,0,,8,86,37,10,3606,1342177280,130,Text,0,,8,101,37,10,3607,1342177280,130,Text,0,gliss,8,15,48,9,3602,1342242819,128,&Gliss,0,sustain,8,27,48,9,3603,1342242819,128,&Sustain,0,program,46,54,27,121,3608,1350631491,133,,0,volume,46,69,27,121,3609,1350631491,133,,0,channel,46,84,23,66,3610,1350631491,133,,0,device,46,99,23,44,3611,1350631491,133,,0,ok,85,8,47,13,1,1342242817,128,OK,0,cancel,85,24,47,13,2,1342242816,128,Cancel,0
dlgBox
gliss
sustain
program
volume
channel
device
buttonup
customEdit
enterPage
reader
leavePage
author
FALSE
contentBar
autoDisable Navigation button
tbk_wid_name
level
direction
disablePage
tbk_wid_props
list,background,book
list,Next,Previous,First,Last
tbk_wid_values
background
prop_level
prop_disablePage
nextPage
help_text
Previous
autoDisable Navigation button
tbk_wid_name
level
direction
disablePage
tbk_wid_props
list,background,book
list,Next,Previous,First,Last
tbk_wid_values
background
prop_level
first
prop_disablePage
previousPage
help_text
First
autoDisable Navigation button
tbk_wid_name
level
direction
disablePage
tbk_wid_props
list,background,book
list,Next,Previous,First,Last
tbk_wid_values
background
prop_level
first
prop_disablePage
firstPage
help_text
autoDisable Navigation button
tbk_wid_name
level
direction
disablePage
tbk_wid_props
list,background,book
list,Next,Previous,First,Last
tbk_wid_values
background
prop_level
prop_disablePage
lastPage
help_text
enterPage
keyDown
keyUp
contentBar
Book Outline
FALSE
visited
sizeSample
Size Sample
sizeSample
book outline
buttonClick
keyChar
buttonClick
8outline"
keyEnter --
enter
%alias
spacebar
buttonclick
FALSE
Cancel
book outline
buttonClick
buttonClick
close
8outline"
Cancel
edit buttons
repage
stringResource
Repage
doRepage
doRepage
doRepage
rP = stringResource("repage")
'wait")
buttonClick
New Widget
XdoRepage
newWidget
buttonClick
buttonClick
newWidget
doRepage
createWidget
helpText
New Widget
New Topic
createTopic
helpText
New Topic
Clear Widget
clearWidget
helpText
Clear Widget
Clear Topic
.&+ +E
.&+ +E
.&+ +E
.&+ +E
topicToDelete
g)updateTopics
clearTopic
contentBar
tPage
ainitPage
stringResource
topics
XdoRepage
ainitpage
widgetIDs
buttonClick
buttonClick
stringResource("topicToDelete")
widgetIDs
<> tl
tPage
selectPage
initpage
initPage
-- the
Mwas
= "contentBar"
clearTopic")
updateTopics -- handlers
doRepage
clearTopic
helpText
Clear Topic
Repage
repage
buttonClick
buttonClick
repage TRUE
Repaginate
helpText
Repage
Clear Book
4875,3060
lessBG
clearBook
helpText
Clear Book
stringResource
PageOutlineHelp
buttonClick
buttonClick
stringResource("PageOutlineHelp")
5145,3570,6625,3900
authorBounds
5145,1155,6625,1485
readerBounds
OutlineHelp
help_text
outline
Outline
marker
vertLoc
vertLoc b
value
ypix =
syspageunitsperpixel
halfH
B- 3*
book outline
source
Navigation widgets
Auto page
Auto buttons
Tab widget
Content buttons
Data widgets
Validate on leaveField, numbers
Validate on leaveField, text
Validate on keystroke, numbers
Validate on keystroke, text
Useful patterns
Spinners
Add and remove
Directories and files
Time and date
International time and date
Calendar
Printer Resolution
Win version & DOS version
Windows or WFW
Field widgets
Insert/overstrike
Outline
Outline rearranger
Max select field
Ex Select field
Self sorting field
Searching field
Auto-scrollbar field
Bold, italic, and underline
Drag a textline
Drag and drop text
Multiple OLE drag & drop
Show off
Graph widgets
Simple Bar Chart
Simple Line Chart
Pie Chart
Exploded pie chart
Slider widgets
Sliders
Ratchet
Scale Slider
CBT widgets
True and false
Multiple choice
Keyboards
Alpha keyboard
Qwerty keyboard
Calculator
MIDI keyboard
Miscellaneous
Object effect
Slow-motion
Exit Windows
Can't touch this
Widget help
Intro to widgets
Basic widgets
Notify messages
Initialization and cleanup
Advanced widgetry
Select Topic
keyChar
keyEnter
buttonClick
B"OK"
FALSE
visited
s_currentTopic
Select Topic
buttonClick
keyChar
buttonClick
4s_currentTopic
comboBox "Select
close
keyEnter --
enter
%alias
spacebar
buttonclick
FALSE
Select Topic
Topics
enterDropDown
enterDropDown
odropDownItems
Topics
Graph widgetsdgets42,77 Data
Field Widgets
Slider Widgets
CBT Widgets
Keyboards
Miscellaneous
CBT widgets
Data widgets
Field widgets
Graph widgets
Keyboards
Miscellaneous
Navigation widgets
Slider widgets
Widget help
Cancel
s_currentTopic
Select Topic
buttonClick
buttonClick
4s_currentTopic
"Select
close
Cancel
Select Topic
e and false
Multiple choice
Keyboards
Alpha keyboard
Qwerty keyboard
Calculator
MIDI keyboard
Miscellaneous
Object effect
Slow-motion
Exit Windows
Can't touch this
Widget help
Intro to widgets
Basic widgets
Notify messages
Initialization and cleanup
Advanced widgetry
Select Topic
Multiple choice
CBT widgets
chapter
FALSE
visited
chapterID
Group id 13 of Page id 37,Group id 6 of Page id 37
widgets
You can set these widgets for multiple choice questions.'
These widgets send a user-defined message. At Reader level you can right-click the group, then click the Custom edit button on the right-click tool bar to determine which button sends what message and to edit the buttons' captions.
There is also a to set handler that will display the same editing dialog box. You need to set the editWidget property of the group to any value. For example, select the group (just the buttons, not the red border,) then type in the Command window: set editWidget of selection to 1. This property can also be set from the object properties list given by tools30.sbk at Author level; just double-click on the editWidget line.
You can place the message handlers in the group script or edit the ones already there.
Most of the work is done in a script in an invisible field. You can get to the script of this field by selecting the appropriate group and executing the following command in the Command window: edit script of item 1 of objects of selection.
A regular old calculator, works great except that it's not solar powered.
Calculator
Calculator
tbk_wid_name
memory
buttonClick
buttonClick
4memory
display
memory
last_key
buttonClick
buttonClick
4last_key, memory
"display" --
display
last_key
memory
buttonClick
buttonClick
4memory, last_key
"display"
"mr"
display
memory
last_key
buttonClick
buttonClick
4last_key, memory
"display" --subtract
calculate
buttonClick
buttonClick
calculate (
LBdisplay
buttonClick
buttonClick
display (
decimal
clear
display
last_key
buttonClick
theStore
buttonDoubleClick
buttonClick
4last_key
"display"
Jkeystroke
4theStore, op
--initialize
temp value
operator
plusminusbtn
display
buttonup
"display"
* (-1)
display
buttonClick
buttonDoubleClick
buttonClick
10011997480157360e+036
FALSE
hotword
month
buttonup
.%, #?
decrement
daysInMonth
is outside range 1 to
increment
decrement
month
increment
month
out of range 1 to 12
month
month
month
decrement
increment
out of range 00 to 99
month
mm / dd / yy
newHotwordID
initialize
31,28,31,30,31,30,31,31,30,31,30,31
month
daysInMonth
hotword
newHotwordID
V, #>
mouseLoc
marker
count
lineHeight
targetLine
lineList
tlines
llineYloc
tline
IvertLoc
buttonDown
lineHeight
sizeSample
lineHeight
lineYloc
marker
lineHeight
adjustSize
kGetValue
button ok
tb30dlg.dll
vSetValue
FALSE
EDIT message,E3604,
BUTtoN ok,B1,TRUE
BUTtoN cancel,B3606,FALSE
listBox answers
524480,6,25,25,186,74,,,Edit True or False,8,MS Sans Serif,,2,3,130,55,3607,1342177287,128,Answers:,0,,5,32,125,7,3603,1342177280,130,Text,0,answers,5,13,49,21,3596,1352728577,131,,0,message,5,42,124,11,3604,1350631552,129,,0,ok,136,7,44,12,1,1342242817,128,OK,0,cancel,136,22,44,12,3606,1342242816,128,Cancel,0
<ManswerMessage
vADialogCallback
=ManswerMessage
2 s_answerMessages
DialogCallback
GetValue
SetValue
GetnListBoxSelection
GetControlText
SetControlText
SetnListBoxSelection
endTBKDialog
,G3607,Answers:
,S3603,Message to Send When Chosen:
LISTBOX answers,L3596,TRUE
customEdit
SetnListBoxSelection
listBox answers
TBKDialogInit
LISTBOX answers
GetnListBoxSelection
SetControlText
Button ok
GetControlText
endTBKDialog
EDIT message
listBox answers
Button cancel
edit message
2 s_answerMessages
TBKDialogCommand
reader
customEdit
reader
enterPage
author
tb30dlg.dll
vSetValue
DialogCallback
SetValue
GetValue
AddListBoxItem
DeletenListBoxItem
EnableControl
GetControlText
GetDialogFocus
GetListBoxItems
GetListBoxSelection
GetnListBoxSelection
SetControlText
SetDialogFocus
SetListBoxItems
SetnListBoxSelection
endTBKDialog
listBox answers
524480,9,25,25,228,104,,,Edit Multiple Choice,8,MS Sans Serif,,2,4,171,80,3597,1342177287,128,Answers:,0,,5,59,125,7,3603,1342177280,130,Text,0,answers,5,17,124,39,3596,1352728577,131,,0,add,133,17,37,12,3600,1342242816,128,&Add,0,delete,133,31,37,12,3601,1342242816,128,&Delete,0,edit,133,45,37,12,3602,1342242816,128,&Edit...,0,message,5,69,124,11,3604,1350631552,129,,0,ok,178,7,44,12,1,1342242817,128,OK,0,cancel,178,22,44,12,3606,1342242816,128,Cancel,0
<ManswerMessage
,G3597,Answers:
,S3603,Message to Send When Chosen:
LISTBOX answers,L3596,
BUTtoN add,B3600,NODISMISS
BUTtoN delete,B3601,NODISMISS
BUTtoN edit,B3602,NODISMISS
EDIT message,E3604,
BUTtoN ok,B1,TRUE
BUTtoN cancel,B3606,FALSE
vADialogCallback
2 s_answerMessages
customEdit
SetControlText
listbox answers
SetnListBoxSelection
listBox answers
button delete
edit message
jGetListBoxSelection
AEnableControl
GetListBoxItems
TBKDialogInit
1+4!7
V, #>
.%, #>
.%, #>
.%, #>
listBox answers
QOtbk_wid_props
invert of target = TRUE
LISTBOX answers
Button add
Button ok
button
lGetDialogFocus
to handle buttonDown
Button edit
edit message
listbox answers
to handle buttonUp
Answer Caption:
4DeletenListBoxItem
newAnswer
endTBKDialog
editWidget
GetControlText
=ManswerMessage
AEnableControl
send (answerMessage of target) to target
GetListBoxItems
to set editWidget
send customEdit to item 1 of my objects
Cancel
wAddListBoxItem
gobjLayer
GetnListBoxSelection
SetControlText
GvSetDialogFocus
BUTtoN cancel
button delete
SetnListBoxSelection
Multiple Choice
Answer &
answer
Button delete
EDIT message
SetListBoxItems
jGetListBoxSelection
sptbk_wid_values
tbk_wid_name
my invert = FALSE
2 s_answerMessages
custom,editWidget
TBKDialogCommand
page,background
objLayer
reader
customEdit
reader
enterPage
author
tb30dlg.dll
vSetValue
DialogCallback
SetValue
GetValue
AddListBoxItem
DeletenListBoxItem
EnableControl
GetControlText
GetDialogFocus
GetListBoxItems
GetListBoxSelection
GetnListBoxSelection
SetControlText
SetDialogFocus
SetListBoxItems
SetnListBoxSelection
endTBKDialog
listBox answers
524480,9,25,25,228,104,,,Edit Multiple Choice,8,MS Sans Serif,,2,4,171,80,3597,1342177287,128,Answers:,0,,5,59,125,7,3603,1342177280,130,Text,0,answers,5,17,124,39,3596,1352728577,131,,0,add,133,17,37,12,3600,1342242816,128,&Add,0,delete,133,31,37,12,3601,1342242816,128,&Delete,0,edit,133,45,37,12,3602,1342242816,128,&Edit...,0,message,5,69,124,11,3604,1350631552,129,,0,ok,178,7,44,12,1,1342242817,128,OK,0,cancel,178,22,44,12,3606,1342242816,128,Cancel,0
<ManswerMessage
,G3597,Answers:
,S3603,Message to Send When Chosen:
LISTBOX answers,L3596,
BUTtoN add,B3600,NODISMISS
BUTtoN delete,B3601,NODISMISS
BUTtoN edit,B3602,NODISMISS
EDIT message,E3604,
BUTtoN ok,B1,TRUE
BUTtoN cancel,B3606,FALSE
vADialogCallback
2 s_answerMessages
customEdit
SetControlText
listbox answers
SetnListBoxSelection
listBox answers
button delete
edit message
jGetListBoxSelection
AEnableControl
GetListBoxItems
TBKDialogInit
1+4!7
V, #>
.%, #>
.%, #>
.%, #>
Cancel
QOtbk_wid_props
wAddListBoxItem
custom,editWidget
LISTBOX answers
button
gobjLayer
GetnListBoxSelection
Button add
SetControlText
GvSetDialogFocus
listbox answers
Button delete
send (answerMessage of target) to target
SetnListBoxSelection
endTBKDialog
newAnswer
GetControlText
lGetDialogFocus
answer
Multiple Choice
Button edit
EDIT message
listBox answers
send customEdit to item 1 of my objects
Answer &
button delete
Answer Caption:
4DeletenListBoxItem
Button ok
editWidget
edit message
Button cancel
SetListBoxItems
=ManswerMessage
jGetListBoxSelection
sptbk_wid_values
tbk_wid_name
AEnableControl
to handle buttonClick
2 s_answerMessages
GetListBoxItems
to set editWidget
TBKDialogCommand
page,background
objLayer
reader
customEdit
reader
enterPage
author
1, "j
.&, "
minus
searchReplace
/searchReplace
0]outLineNumber
minus
indentLevel
curLevel
subheadings
buttonDoubleClick
keyDown
.&+ +
source
/searchReplace
curmode
subheadings
source
operatingMode
reader
JFoperatingmode
enterPage
JFoperatingmode
author
JFoperatingmode
reader
source
textLineNumber
indentLevel
subHeadings
,%H.%
counter
indentLevel
indentLevel
outlineNumber
false
indentLevel
foundNextSibling
textlineNumber
A7oldBook
minus
Use copy, not cut, on this widget.
Cancel
B7oldBook
You must save this book before copying this widget.
FALSE
txClassName
Thumb
setSliderLimits
buttonDown
1,"!#
false
s_sliderPosition
HSliderThumb
s_sliderv
VSliderThumb
txClassName
s_sliderMin
s_sliderMax
oslidePos
9sldrPosition
buttonStillDown
s_sliderV
false
snapSlider
s_sliderPosition
HSliderThumb
VSliderThumb
txClassName
s_sliderMin
s_sliderMax
oslidePos
sliderPosition
buttonUp
s_sliderV
HSliderThumb
VSliderThumb
txClassName
s_sliderMin
s_sliderMax
glide
setSliderLimits
slidePos
9sldrPosition
sliderPosition
newPos
OldMax
hSliderThumb
pOffset
group
SliderThumb
OldMin
vSliderThumb
txClassName
s_sliderMin
s_sliderMax
thumb
setSliderLimits
sliderPosition
9sldrPosition
sliderPosition
detentList
snapSlider
sliderMove
sliderMax
sliderMin
sliderMax
sliderBounds
sliderMin
nearestPupp
thumb
mySliderPos
nearestPUPP
sliderPos
sliderMax
curfield
numTics
mtallTicSpacing
sliderMin
DxCenter
LnumTics
adjustNumbers
xCenter
mySliderMax
sliderMin
W\adjustNumbers
is invalid.
sliderMin
sliderMax
sliderMax
sliderMax
mySliderMin
W\adjustNumbers
is invalid.
sliderMin
,%H.%
myTallTicSpacing
W\adjustNumbers
tallTicSpacing
curLine
sliderMax
sliderMin
thumb
sliderMax
sliderBounds
W\adjustNumbers
sliderMin
numTics must be a value between 1 and 50.
myNumTics
nearestPupp
nearestPUPP
leftMost
numTics
myTallTicSpacing
tallTicSpacing
mySliderMin
sliderMin
myNumTics
numTics
mySliderMax
sliderMax
mySliderPos
sliderPos
startSliderMove
sliderMove
endSliderMove
nearestPUPP
getSystemMetrics
getSystemMetrics
primaryMouseButton
NON-ALPHA
,toggleInvert
ALPHA
txClassName
input
initialButton
initialButtonClass
buttonDown
invertedButton
NON-ALPHA
invertedButtonClass
ALPHA
initialButton
initialButtonClass
label
buttonUp
invertedButton
.isChild
NON-ALPHA
,toggleInvert
invertedButtonClass
ALPHA
txClassName
label
buttonStillDown
buttonDoubleClick
FALSE
Enter
labelText
Shift
Caps Lock
input
buttonClick
input
enterPage
1,"!"
invertedButton
NON-ALPHA
invertedButtonClass
ALPHA
label
toggleInvert
FALSE
group
isChild
label
field
ALPHA
txClassName
labelText
Miscellaneous
Slow-Motion,Object Effect,Exit Windows,Can't Touch This
myPageList
62,61,63,64
widgetIDs
62,61,63,64
Slow-motion
Miscellaneous
chapter
FALSE
visited
chapterID
Button id 5 of Page id 61
widgets
This widget is useful if you need to let the user slow down a process, such as an animation.
This checkbox slows ToolBook down by a particular factor set in the script.
in,true
ThreeDeeRect
bottomLine
topLine
Slow-Mo
nplastTime
oplastTime
newTime
timeGetTime
enterPage
mmsystem
leavePage
timeGetTime
oplastTime
timeGetTime
mmsystem
notifyBefore
lastTime
newTime
timeGetTime()
- lt >= 100
unlinkDLL "mmsystem"
notifyAfter
DWORD
lastTime
Slow-Mo
tbk_wid_name
Slow-Mo
,%H.%
rainbowCount
buttonStillDown
notifyBefore Idle
4rainbowCount
NULL)
k10 = 0)
sObj
saveCol
Ri + 1
sendNotifyBefore
A Rainbow
enterPage
leavePage
buttonStillDown
FALSE
Object effect
Miscellaneous
chapter
chapterID
Button id 1 of Page id 62,Button id 0 of Page id 62
widgets
FALSE
visited
Applies page navigation effects to individual objects.
This effect works because of a subtle difference between ToolBook's sysLockScreen property and the Windows API function LockWindowUpdate.
You can use these widgets as is for random effects, or alter the scripts to hardwire them to your favorite objects.S
Single
single_object_effect
tbk_wid_name
Single Object
Multiple
multiple_object_effect
tbk_wid_name
Multiple Objects
FALSE
Exit Windows
Miscellaneous
chapter
FALSE
visited
chapterID
Button id 1 of Page id 63
widgets
Demonstrates three methods for exiting Windows.
Note: This button has been disabled to prevent accidents.
This widget links to the Windows API call for exiting Windows. It then prompts the user for the manner in which it should make the exit. One way is to exit Windows to DOS. Another is to exit Windows and restart it. The third is to reboot the machine.
There is an alternative interface embedded in the comments of the script.
Exit_Windows
Exit_Windows
tbk_wid_name
Exit Windows
FALSE
Miscellaneous
chapter
FALSE
visited
chapterID
Button id 1 of Page id 63
widgets
Demonstrates three methods for eSEARCHERTBK
DROP CUR
FLAND WAV
Drag and Drop Text
Multiple OLE drag & drop
06cleanUp
leavePage
,%H.%
dropFiles
cleanUp
cleanUp
objs =
c"OLE"
"dropFiles"
Field widgets
chapter
chapterID
FALSE
visited
Field id 0 of Page id 30
widgets
Drag files from the File Manager into the field below.
This field extends ToolBook's OLE capabilities by accepting multiple objects simultaneously, and by displaying the file names of the OLE objects.
Just before each drop and at the leavePage message, the OLE objects already on the page are deleted and the text of the field is cleared. This is a function of the page, not the widget.
dropFiles
OLE Drop field
tbk_wid_name
enterPage
leavepage
cleanUp
reader
FALSE
w, #?
disablePage
level
page of this
enterPage
w, #?
go to
level
page of this
buttonClick
prop_level
invalid level for widget:
background, book
must be "background" or "book"
level
prop_level
level
First
must be "Next", "Previous", "First", or "Last"
invalid direction for widget:
Next,Previous,First,Last
disablePage
direction
direction
prop_disablePage
invalid disablePage:
First, last
must be "First" or "Last"
disablePage
prop_disablePage
disablePage
w, #?
disablePage
level
page of this
enterPage
w, #?
go to
level
page of this
buttonClick
prop_level
invalid level for widget:
background, book
must be "background" or "book"
level
prop_level
level
First
must be "Next", "Previous", "First", or "Last"
invalid direction for widget:
Next,Previous,First,Last
disablePage
direction
direction
prop_disablePage
invalid disablePage:
First, last
must be "First" or "Last"
disablePage
prop_disablePage
disablePage
w, #?
disablePage
level
page of this
enterPage
w, #?
go to
level
page of this
buttonClick
prop_level
invalid level for widget:
background, book
must be "background" or "book"
level
prop_level
level
First
must be "Next", "Previous", "First", or "Last"
invalid direction for widget:
Next,Previous,First,Last
disablePage
direction
direction
prop_disablePage
invalid disablePage:
First, last
must be "First" or "Last"
disablePage
prop_disablePage
disablePage
w, #?
disablePage
level
page of this
enterPage
w, #?
go to
level
page of this
buttonClick
prop_level
invalid level for widget:
background, book
must be "background" or "book"
level
prop_level
level
First
must be "Next", "Previous", "First", or "Last"
invalid direction for widget:
Next,Previous,First,Last
disablePage
direction
direction
prop_disablePage
invalid disablePage:
First, last
must be "First" or "Last"
disablePage
prop_disablePage
disablePage
.&+ +E
quickSort
default
sortSelf
s_noSwap
quickSrt
quickSort
quicksrt
s_noSwap
quickSrt
d_insertLineAux
insertLine
middleLine
insertLineAux
propList
POtbk_wid_props
rptbk_wid_values
curval
&getPropListFromHandlers
widname
curProp
tbk_wid_name
props
initDLG
.&+ +
proplist
propList
G[updateDB
enterPage
,%H.%
curline
getPropListFromHandlers
propList
QOtbk_wid_props
curLine
Uh-oh. Nothing is selected.
sptbk_wid_values
widname
You must name the widget before you can save its properties.
tbk_wid_name
updateWidget
cancel
kGetValue
button ok
tb30dlg.dll
vSetValue
FALSE
EDIT message,E3604,
BUTtoN ok,B1,TRUE
BUTtoN cancel,B3606,FALSE
listBox answers
524480,6,25,25,186,74,,,Edit True or False,8,MS Sans Serif,,2,3,130,55,3607,1342177287,128,Answers:,0,,5,32,125,7,3603,1342177280,130,Text,0,answers,5,13,49,21,3596,1352728577,131,,0,message,5,42,124,11,3604,1350631552,129,,0,ok,136,7,44,12,1,1342242817,128,OK,0,cancel,136,22,44,12,3606,1342242816,128,Cancel,0
You can drag any textline to a new position in the field below.
This field allows you to drag a textline up or down and displays the results as you drag.
DragTextline
dragTextLine
beginDrag
+",!"
+",H4
+",!J
+",H4
2, #>
+",H4
dragTextLine
stillOverDrop
beginDrag
dragTextLine
oselectedTextLines =
stillOverDrop pObject, loc
currentTextLine
currentTextline =
&CRLF
+ 1
dragTextline =
DragTextline
tbk_wid_name
smith
FALSE
Drag a Textline
bvxcsawqw
Slider widgets
Sliders,Ratchet
myPageList
33,34,81
widgetIDs
33,34,81
Slider Widgets
Can't Touch This
Calendar
Sliders
Slider widgets
chapter
FALSE
visited
chapterID
Group id 7 of Page id 33,Group id 3 of Page id 33
widgets
These widgets demonstrate how to make graphical sliders.
The baseball slider uses a resource of the book; the pointer slider uses a line end.
horizSlider
sldrPosition
horizSlider
tbk_wid_name
centered
HSliderThumb
txClassName
vertSlider
sldrPosition
vertSlider
tbk_wid_name
VSliderThumb
txClassName
Slider with graphic button
Slider with line endbutton
FALSE
Sliders
Snoopy
Ratchet
Slider widgets
chapter
FALSE
visited
chapterID
Group id 123 of Page id 34,Group id 39 of Page id 34
widgets
These ratchet sliders constrain the user's choices to certain values.
Each widget allows itself to be set only at the hash marks. The user doesn't have intermediate values available, and this fact is reinforced by the visual feedback. The widget on the right also reports what mark it has been set to.
slider
slider
tbk_wid_name
,%H.%
1,!JRY
,%H.%
slider
buttonDown
-- This handler jumps the slider
each tick mark
mouse
moved
Zarray x[5], pin[4]
i] = (((
U(i+1))-(
Ui))/2 )+(
x[i] = (
Ui)-82
pos =
" = x[1]
" = x[2]
" = x[3]
When
" = x[4]
" = x[5]
slider
emitting_Slider
emitting_Slider
tbk_wid_name
slider@
,%H.%
1,!JRY
,%H.%
slider
buttonDown
-- This handler jumps the slider
each tick mark
mouse
moved
Zarray x[5], pin[4]
i] = (((
U(i+1))-(
Ui))/2 )+(
x[i] = (
Ui)-82
pos =
" = x[1]
" = x[2]
" = x[3]
When
" = x[4]
" = x[5]
slider2
track
FALSE
Ratchet
Book Outline
Navigation widgets
CBT widgets
True and False,Multiple Choice
myPageList
36,37
widgetIDs
36,37
True and false
CBT widgets
chapter
FALSE
visited
chapterID
Group id 9 of Page id 36,Group id 4 of Page id 36
widgets
These widgets can be set for true and false questions.
These widgets send a user-defined message. At Reader level you can right-click the group, then click the Custom edit button on the right-click tool bar to determine which button sends what message.
There is also a to set handler that will display the same editing dialog box. You need to set the editWidget property of the group to any value. For example, select the group (just the buttons, not the red border,) then type in the Command window: set editWidget of selection to 1. This property can also be set from the object properties list given by tools30.sbk at Author level; just double-click on the editWidget line.
You can place the message handlers in the group script or edit the ones already there.
Most of the work is done in a script in an invisible field. You can get to the script of this field by selecting the appropriate group and executing the following command in the Command window: edit script of item 1 of objects of selection.
T/F Buttons
buttonDown
<ManswerMessage
buttonUp
editWidget
You chose
answerTrue
You chose
answerFalse
-- Tim Pearson, Asymetrix 1/94
= FALSE
>= TRUE
(answerMessage
editWidget
customEdit
the handlers below
suit your needs --
answerTrue
"You chose" &&
answerFalse
T/F Buttons
tbk_wid_name
editWidget
tbk_wid_props
custom,editWidget
tbk_wid_values
widgetParent
answerTrue
answerMessage
&TRUE
false
answerFalse
answerMessage
&FALSE
T/F Radio Buttons
<ManswerMessage
buttonClick
editWidget
You chose
answerTrue
You chose
answerFalse
-- Tim Pearson, Asymetrix 1/94
buttonClick
(answerMessage
editWidget
customEdit
the handlers below
suit your needs --
answerTrue
"You chose" &&
answerFalse
T/F Radio Buttons
tbk_wid_name
editWidget
tbk_wid_props
custom,editWidget
tbk_wid_values
widgetParent
answerTrue
answerMessage
&TRUE
false
answerFalse
answerMessage
&FALSE
customEdit
reader
enterPage
author
FALSE
CBT widgets
chapter
FALSE
visited
chapterID
GrX
CLIPART
SETUP
OSPY EXE
FINAL
GETHOOK BAT
Windows or WFW
Data widgets
chapter
chapterID
FALSE
visited
Button id 0 of Page id 17
widgets
This widget distinguishes between Windows 3.1 and Windows for Workgroups.
This widget checks to see if a driver necessary for Windows for Workgroups is loaded (wfwnet.drv), in order to determine which version of Windows is running.
Windows_WFW
getModuleHandle
getModuleHandle
wfwnet.drv
Running Windows
kernel
Running Windows for Workgroups
buttonClick
buttonClick
linkDLL "kernel"
WORD getModuleHandle (STRING)
("wfwnet.drv")
"Running Windows"
Workgroups"
unlinkDLL "
Windows_WFW
tbk_wid_name
Windows or WFW
FALSE
Field widgets
Insert/Overstrike,Self Sorting Field,Auto-scrollbar Field,Searching Field,Bold; Italic; and Underline,Drag and Drop Text,Drag a Textline,Max Select Field,XSelect Field,Outline
myPageList
19,22,20,21,23,25,27,26,28,31,29,30,24
widgetIDs
FALSE
visited
Insert/overstrike
Field widgets
chapter
FALSE
visited
chapterID
Field id 4 of Page id 19,Field id 0 of Page id 19
widgets
This field is capable of typical "overstrike" behavior.
ToolBook does not support overstrike in any of its text fields. But with this handy widget, you can have overstrike behavior in your application. For example, at Reader level, toggle the insert key and type in the field below.
Insert_Overstrike
overWriteFlag
keyDown
overWriteFlag
keyChar
4LOGICAL overWriteFlag
4logical
` <>
Insert_Overstrike
tbk_wid_name
Now is the time for all good men to come the aid of their quick brown fox.............te
endNow is the time for all good men to come the aid of their quick brown fox.
Toggle
overWriteFlag
keyDown
overWriteFlag
enterPage
notifyAfter
4LOGICAL overWriteFlag
Insert_Overstrike_Toggle
tbk_wid_name
keyDown
enterPage
FALSE
Insert/Overstrike
Bold, Italic, and Underline
Object Effect
Outline rearranger
Field widgets
chapter
chapterID
FALSE
visited
Group id 5 of Page id 20
widgets
You can move individual textlines or whole sections, by dragging the textlines in the field.
Tabbed textlines can be dragged up or down, and whole sections can be moved by dragging the textline at the head of a section. The indicator is an obscured line with a line end on it. There is a field covered by the main field, and we use the bounds of a hotword in the hidden field to find the height of a line of text.
Outline_Rearranger
lineheight
hotfield
outfield
outline_rearranger
sizeSample
adjustsize
sized
enterpage
reader
-- initialize the
sized
hotfield
"sizeSample"
outfield
"outline_rearranger"
ypix
sysPageUnitsPerPixel
syssuspendmessages
adjustsize
ylineheight
o,3)
notifybefore
notifyAfter
Outline_Rearranger
tbk_wid_name
sizeSample
\ R Y
sizeSample
outline_rearranger
Frame Animation
Introduction to Frame Animation
Page Flipping
Hiding and Showing objects
Moving Objects
Move By
Move To
The Position Property
Useful Scripts
Simulating Gravity
Timing Animation
Animating with Resources
Simulating a Good 5 Cent Cigarood 5 Cent CigarGood 5 Cent Cigar To
The Position Property
Simulating Gravity
Timing Animation
Simulating a Good 5 Cent Cigary
Timing Animation The Position Property
Moving Objects
Move To
Move By
marker
vertLoc
vertLoc b
value
ypix =
syspageunitsperpixel
halfH
B- 3*
enterpage
reader
FALSE
Max select field
Field widgets
chapter
FALSE
visited
chapterID
Field id 0 of Page id 21
widgets
This handler limits the number of selectable lines in a multi-select list box.
This handler can be placed in a system book or in the book or page script so it will work with more than one multi-select list box. It takes one parameter, Num, which represents the maximum number of selections allowed.
To call the maxSelection handler use the following syntax:
to handle buttonClick
send MaxSelection 3
end buttonClick
MaxSelect
MaxSelect
tbk_wid_name
One One One
Two Two Two
Three Three Three
Four Four Four
Five Five Five
FALSE
Max Select Field
Windows or WFW
Printer Resolution
wertwert
d \ \ 4
Outline
Field widgets
chapter
FALSE
visited
chapterID
Field id 7 of Page id 22
widgets
Use this widget to create a field you can use as an outline at Reader level.
At Author level, you can set the level of the text in the outline by typing Ctrl+Tab. When the outline field is copied and pasted into another book, it retrieves the resources for the plus and minus bitmaps from the first book.
The Ex Select widget allows for an exclusive selection, acting like a single-select list box inside a multi-select list box.
The XSelect handler allows multiple selections in a list box as long as the specified line is not selected. Once the specified line is selected, all other lines in the list box are unselected.
This handler can be placed in a system book or in the book or page script, so it will work with more than one multi-select list box.
The handler takes one parameter, "XLine", which represents the line to make exclusive.
To call the Xselect handler use the following syntax:
to handle buttonClick
send Xselect 5
end buttonClick
XLine
Ex Select
tbk_wid_name
One One One
Two Two Two
Three Three Three
Four Four Four
FiveFiveFive
FALSE
Show off
Field widgets
chapter
chapterID
FALSE
visited
Field id 0 of Page id 24
widgets
This widget is a good example of using Windows directly from ToolBook to do something that is otherwise not possible in ToolBook.
While it isn't usually necessary, you can link directly to Windows from ToolBook. This example takes advantage of a Windows capability not built into ToolBook.
RotateText
RotateText
tbk_wid_name
Click me and watch me rotate
leavePage
FALSE
Self sorting field
Field widgets
chapter
FALSE
visited
chapterID
Group id 10 of Page id 25
widgets
This self-sorting field has scripts for sorting any text placed in it, and for inserting any textline in sorted order.-
To sort text in this widget field, set the text of the field to the text you want sorted, then send the field the message sortSelf. The "set text & sort" button uses the following script:
set text of field "sort" to text of field "data"
send sortSelf to field "sort"
To insert a new line into the text, send the field the message insertLine with the text of the new line as a parameter. The "insert a textline" button has this script:
This field recognizes when the text starts to overflow, and turns itself into a scrolling field.
By testing the textOverflow property, this field becomes a scrolling field when it holds more text than it can display. The Details field in this book uses this method.
Auto_Scroll
zashowOrHideScrollbar
enterPage
zashowOrHideScrollbar
leaveField
zashowOrHideScrollbar
keyUp
zashowOrHideScrollbar
showOrHideScrollbar
notifyBefore
showOrHideScrollbar
notifyAfter
E> 0
Auto_Scroll
tbk_wid_name
jfkdls;a
fdjklsa;fhndfg dfg
dfh;ajfklds;
enterPage
leaveField
keyUp
FALSE
Auto-scrollbar Field
Calculator
International Auto Date and Time
Searching field
Field widgets
chapter
FALSE
visited
chapterID
Group id 3 of Page id 27
widgets
By typing in the field at the top, you can find an entry in the field below.
In response to the enterPage message for this page, the scrolling field fills an array with its text. This helps speed the search that takes place after each keyDown message in the upper field.
search
search
tbk_wid_name
index
.&+ +
itemArray
enterPage
buttonUp
notifyBefore
4ARRAY STRING itemArray[]
fill
B] order
oselectedTextlines
activate
after
again
alias
align
angle
application
argument
ascending
background
backgroundimage
before
bitand
bitnot
bitor
bitshiftleft
bitshiftright
bitxor
break
caption
changes
character
characters
chars
check
chooseresource
clear
close
closefile
closeremote
commandwindow
conditions
contains
context
continue
createfile
deactivate
decrement
default
descending
dimensions
direction
disable
dynamic
eighth
eject
enable
excluding
execute
executeremote
export
extend
fifth
first
fixed
format
forward
fourth
fxdissolve
fxwipe
fxzoom
getremote
graphic
handle
helptext
import
importgraphic
increment
insteadof
items
keepremote
linkdll
local
locateonly
magnify
menubar
menuenabled
menuitem
menuitemchecked
menuitemenabled
menustate
middle
minimized
modal
ninth
normal
notactive
notifyafter
notifybefore
number
openfile
order
pageimage
password
pause
previous
print
properties
readfile
records
reference
remove
request
reset
resource
resourcecount
resourcelist
respondremote
restore
return
scrollbar
search
second
seconds
seekfile
select
sendnotifyafter
sendnotifybefore
separator
setmenuhelptext
setmenuitemhelptext
setmenuitemname
setmenuname
setremote
seventh
shift
silently
sixth
speed
spooler
start
store
target
tenth
textfrompoint
textline
textlines
third
ticks
topic
transition
translatewindowmessage
uncheck
unlinkdll
unselect
until
untranslateallwindowmessages
untranslatewindowmessage
using
variable
variables
while
window
within
without
words
writefile
seed
seekfile
select
self
send
sendnotifyafter
sendnotifybefore
separator
set
setmenuhelptext
setmenuitemhelptext
setmenuitemname
setmenuname
setremote
seventh
shift
show
silently
sixth
slow
sort
speed
spooler
start
step
store
target
tenth
textfrompoint
textline
textlines
then
third
this
ticks
time
to
tool
topic
transition
translatewindowmessage
uncheck
unlinkdll
unselect
until
untranslateallwindowmessages
untranslatewindowmessage
using
variable
variables
when
while
window
with
within
without
word
words
writefilefile
enterPage
FALSE
Bold, italic, and underline
Field widgets
chapter
FALSE
visited
chapterID
Group id 4 of Page id 28
widgets
The buttons below will bold, italicize, or underline any selected text.
These buttons send the bold, italic, or underline message to change any text you have selected. The group script uses a notify handler to determine the correct state for the buttons after new text has been selected.
Bold_Italic_Underline
.&, "
hasUnderline
Italic
hasItalic
hasBold
underline
FALSE
italic
s_widOldText
Underline
notifyAfter
4s_widOldText
= TRUE
FALSE
hasBold =
hasItalic =
hasUnderline =
Bold_Italic_Underline
tbk_wid_name
buttonClick
buttonClick
FALSE
inverted
Italic
buttonClick
buttonClick
FALSE
inverted
Underline
buttonClick
buttonClick
FALSE
inverted
This is a test of the Bold, Italic, and Underline widget buttons.dsfdklfjdksl;ajfa
FALSE
Drag and drop text
Field widgets
chapter
FALSE
visited
chapterID
Field id 0 of Page id 29
widgets
This widget enables you to select text, then drag it into another field.
This widget allows you to drag any text out of it and then drop that text into any field that has its allowDrop property set to true. You can create such a field in the application you paste the widget into by drawing a field, then setting allowDrop to true from the Field Property dialog box.
Drag_Drop_Text
Drag_Drop_Text
tbk_wid_name
Drag&Drop:
Select some text in this field and drag it to one of the others. One of the other fields allows drops, the other doesn't. Test,
stest
tetstetst
stillOverDrop
enterDrop
stillOverDrop sourceObj, loc
FALSE
caretLocation
enterDrop
FALSE
FALSE
Drag and drop text
Data widgets
Time and Date,Spinners,Validate on leaveField; Numbers,Validate on leaveField; Text,Validate on Keystroke; Numbers,Validate on Keystroke; Text,Directories and Files,Add and Remove
myPageList
9,10,11,12,79,8,14,13,15,141,80,86,16,17
widgetIDs
Spinners
Data widgets
chapter
FALSE
visited
chapterID
Group id 29 of Page id 8,Group id 17 of Page id 8,Group id 6 of Page id 8
widgets
These widgets let you set data in a field by "spinning" to the desired value. In the time and date widgets, select what part you want to change.
All three spinners are groups. The integer spinner has simple scripts in each button that increment and decrement the value in the field.
The date and time spinners are more sophisticated. The buttons set the value of the selected part of the date or time; the fields need some fairly complicated algorithms to recognize which values are legal.
Integer
Integer
tbk_wid_name
integer
spinUp
w%spinUp
buttonDown
w%spinUp
buttonStillDown
spinUp
"integer"
integer
spinDown
|spinDown
buttonDown
|spinDown
buttonStillDown
spinDown
"integer"
integer
tbk_wid_name
month
month
buttonDown
month
month
buttonStillDown
selectedHotwords
"day"
"month"
"year"
increment
decrement
increment
evaluate(day)
04 / 19 / 777
month
tbk_wid_name
;seconds
seconds
minute
minute
buttonDown
;seconds
seconds
minute
minute
buttonStillDown
selectedHotwords
"hour"
"Time"
"minute"
"AMPM"
increment
decrement
increment
evaluate(day)
09 : 25 : 27 PMM
minute
seconds
integer:spinner:
date:spinner:
time:spinner:er
FALSE
Spinners
Outline
Self Sorting Field
Simple Line Chart
Pie Chart
Validate on leaveField, numbers
Data widgets
chapter
FALSE
visited
chapterID
Field id 3 of Page id 9,Field id 2 of Page id 9,Field id 1 of Page id 9,Field id 0 of Page id 9
widgets
This widget validates numeric data when the user leaves the field.s
The widget fields will only accept data of the type described in the fields to the left of the widgets. The widget tests the data for the valid type when the user leaves the field.Q
LeaveField_Number
The value in the field must be a number.
leaveField
xisType(REAL,
"The value
must be a
LeaveField_Number
tbk_wid_name
034.344r
LeaveField_Integer
The value in the field must be an integer.
leaveField
x(isType(REAL,
k1) = 0)
"The value
must be
integer."
LeaveField_Integer
tbk_wid_name
-12333.444444
LeaveField_PosNumber
The value in the field must be a positive number.
leaveField
x(isType(REAL,
"The value
must be a positive
LeaveField_PosNumber
tbk_wid_name
55.5444444444
LeaveField_PosInt
The value in the field must be a positive integer.
leaveField
x(isType(REAL,
k1 = 0)
"The value
must be a positive integer."
LeaveField_PosInt
tbk_wid_name
5444444765444
Number:
Integer:
Positive Number:
Positive Integer:
FALSE
Validate on leaveField, Numbers
Add and Remove
fgdfgh
Validate on leaveField, text
Data widgets
chapter
FALSE
visited
chapterID
Field id 6 of Page id 10,Field id 4 of Page id 10,Field id 1 of Page id 10,Field id 0 of Page id 10
widgets
This widget validates text when the user leaves the field.o
The widget fields will only accept data of the type described in the fields to the left of the widgets. The widget tests the data for the valid type when the user leaves the field.
The first widget uses a pattern editable from the script. The third and fourth widgets use the sysDateFormat and sysTimeFormat.
The characters in the field must all be in the alphabet.
leaveField
= 32
= 9))
< 65)
> 90
< 97)
> 122)
"The
must
alphabet."
LeaveField_Whitespace
tbk_wid_name
Foobar Barfoorrrrrrrrr
Pattern match:
Alpha - whitespace:
LeaveField_Date
not a valid date, use:
leaveField
xisType(
xa valid
r, use:" &&
LeaveField_Date
tbk_wid_name
1/1/6555
Date:
LeaveField_Time
not a valid time, use:
leaveField
xisType(
xa valid
I, use:" &&
LeaveField_Time
tbk_wid_name
12:00:00 AM
Time:
FALSE
Validate on keystroke, numbers
Data widgets
chapter
FALSE
visited
chapterID
Field id 3 of Page id 11,Field id 2 of Page id 11,Field id 1 of Page id 11,Field id 0 of Page id 11
widgets
The numerical value is validated after each keystroke.k
The widget fields will only accept data of the type described in the fields to the left of the widgets. The widget tests the data after each keystroke.
Keystroke_Number
1234567890-+
1234567890
characterPosition
keyChar
key, isShift, isControl
ZSTRING characterTyped
= ansitoChar(
numberDigits =
characterPosition =
caretLocation
j = "."
~(".",
) = 0
h> 0
X> 1)
"1234567890-+"
"1234567890"
key =
Keystroke_Number
tbk_wid_name
4254.7644444444444444
Keystroke_Int
1234567890-+
1234567890
keyChar
key, isShift, isControl
ZSTRING characterTyped
"1234567890"
caretLocation
"1,0"
"1234567890-+"
Keystroke_Int
tbk_wid_name
-567563
Keystroke_PosNum
1234567890
1234567890+
keyChar
key, isShift, isControl
ZSTRING characterTyped
= ansitoChar(
numberDigits =
"1234567890+"
_ = "."
~(".",
) = 0
"1234567890"
Keystroke_PosNum
tbk_wid_name
98.56577577776565777
Keystroke_PosInt
numberDigits
1234567890
1234567890+
keyChar
key, isShift, isControl
ZSTRING characterTyped
= ansitoChar(
numberDigits =
"1234567890+"
"1234567890"
Keystroke_PosInt
tbk_wid_name
8765408765444
Number:
Integer:
PosNum:er
PosInt:
FALSE
Validate on Keystroke, Numbers
sdgsdfg
MIDI Keyboard
Validate on keystroke, text
Data widgets
chapter
FALSE
visited
chapterID
Field id 6 of Page id 12,Field id 5 of Page id 12,Field id 0 of Page id 12
widgets
This widget validates the text after each keystroke.3
The widget fields will only accept data of the type described in the fields to the left of the widgets. The test is made after each keystroke. The pattern for the first widget is a user property. !
Field id 2 of Page id 13,Field id 4 of Page id 13,Field id 1 of Page id 13,ComboBox id 3 of Page id 13,Field id 0 of Page id 13
widgets
These fields can navigate to and display information from your DOS directories.
These five widgets provide a way to move around in the DOS file system. Changing items here actually changes what drive you are logged onto and what directory is current.
&Directories
directories
directories
tbk_wid_name
CLIPART
SAMPLES
SETUP
TUTORIAL
WINAPISNDAPPS
WINDOWS
WINVIDEO
WINWORD
ZIPPERL
MSVCPP
PDOXWIN
SOUND
THINGS
TSCSI
WINDOWS
WINVIDEO
WINWORD2
ZIPPERX
HELPHOOK
HFORM
HOOKS
INPUT
INSTVER
LISTHORZ
LOWPASS
MACROHLP
MAKEAPP
MCITEST
MEMORY
MIDIMON
MULTIPAD
MUSCROLL
MYPAL
MYSCRIB
OUTPUT
OWNCOMBO
OWNERB
PALETTE
PENCNTL
PENPAD
PRNTFILE
PROFILER
QWGDEMO
REVERSE
ROTARY
SELECT
SHOWDIB
SHOWGDI
SNOOP
SORTDEMO
SRVRDEMO
TDOSMEM
TIMERS
TOOLHELP
VERSTAMP
WINMEM32
WMFDCODE
XTENSION
LAURELM
HOURIR
BRIANT
CHARLESO
ERIKR
FRANKL
DICKE
BRUCEL
MIYUKIH
JOHNJ
SARAHV
TRANSFER
CHARLES
CHRISC
CHUCKW
CLAUDE
STEVEW
CATHYS
ALLANF
LENORAF
CRAIG
JOHNCO
DANNS
DARLENEM
DAVEH
KEVINB
LINDAA
DAWNM
DEBBIE
INGRIDF
DENNISO
STEVET
GIGIL
DOUGY
TERRYL
WHITEY
SCOTT
MIREIZ
LORIJ
CHARLESC
TAMMYH
AUSTRIA
MITCHELL
SWISS
SAVER
DENNISC
DOUGK
EPOCH
SCOTTM
MIKEF
GER_CPL
ELAINER
MELODY
JOHNGO
SCOTTSC
GREGE
HARRIETL
HARRYS
CSC_TOM
JACKIEV
MIKEN
JEAND
JEFFA
JOELK
JEFFU
JENNIFER
WHITNEYM
JEREANG
DICKH
JANETS
RANDYA
JOHNA
JOHNB
JOHNC
JOHNG
JOHNT
JONES
JORDANS
JOSEPHB
JOSHB
JULIE
KATHERIN
KEITHC
YVETTEB
DIDIERB
LANCE
LAURELC
LISAA
CSC_TAMY
LORIP
WAYNEW
MARCS
MARIEF
BETHR
MARKMA
MARTY
KIKIW
RICKS
BRIANH
MICHAELS
JEFFM
DEBBIEP
MIKEM
MOUSE
NADIMH
NANETTE
NORMS
PAULD
PAULG
PAULM
PHILP
LOGOS
DENNISL
RICKE
MICHELEC
DIANED
ROSSG
ROSSH
CHARLOTT
SCREENS
SHABBIR
LISAM
SARAHH
SHELLEYH
SHERRI
SHIRLEY
SHUANGL
SKUSALES
STEVEB
STEVEBA
STEVEBEC
STEVENW
SUSAND
SUSANM
SUZYS
MARKR
TERONU
TRACEY
TRAINING
TYLERB
SCOTS
WHOWHERE
WINNIE
TONYA
SUSANP
DAVIDS
SYPLUS
JOHND
DALEW
JENNW
JULIEP
BETHH
PRODUCTI
MIKES
MARGOTP
MICHAELO
STEVEC
JANETL
LYNNEP
TYRONEF
MIKEST
KRISTINE
BILLS
SANDYW
GAARL
MIKEP
BRADC
SUSANH
STEPHEN
STEVEF
D&rives
Drives
Drives
tbk_wid_name
Fi&les
file list
file list
tbk_wid_name
ANIMATE.ICO
ANIMATE.TBK
AUTOEDIT.EXE
AUTOEDIT.ICO
BASMIDI.TXT
CHIRP.WAV
COMPANY.NDX
CONTACT.DBF
CONTACT.ICO
CONTACT.TBK
DBEXCHNG.ICO
DBEXCHNG.TBK
DBHXCHNG.TBK
DIALOG.HLP
DIALOG.ICO
DIALOG.TBK
FEATURES.ICO
FEATURES.TBK
HANDBOOK.ICO
HANDBOOK.TBK
HANDBOOK.TXT
LIBRARY.ICO
LIBRARY.TBK
MAPI.ICO
MAPI.TBK
MIDITEST.TBK
MWIDGETS.TBK
NAME.NDX
PAT.MID
PAT2.MID
SCRAPBK.ICO
SCRAPBK.TBK
TAQUIN.BMP
TAQUIN.ICO
TAQUIN.TBK
WHOWHERE.DB
WHOWHERE.ICO
WHOWHERE.MB
WHOWHERE.PX
WHOWHERE.TBK
WIDGETS.ICO
WIDGETS.TBK
WIDGETSJ.TBK
WIDGHTS.TBK
TOOLS30.SBK
WINCOMT.DLL
WINCONST.HLP
WRKBNCHT.DLLGR.HLP
SYSINFO.EXE
TB30DB3.DLL
TB30DLG.DLL
TB30DOS.DLL
TB30PDX.DLL
TB30WIN.DLL
TB30XTR.DLL
TBKMM.SBK
TBKMMWID.FON
TEST10.TBK
TEST2.TBK
TEST3.TBK
TEST4.TBK
TEST5.TBK
TEST6.TBK
TEST7.TBK
TEST8.TBK
TESTBMP.TBK
TESTING.TBK
TESTMAX.TBK
TESTMAX2.TBK
TESTMAX3.TBK
TESTMIX.TBK
TIMER.TBK
TIMER2.TBK
VEAMAA51.LEX
VEGEAA51.LEX
WAVED30.HLP
WAVEED30.HLP
WCTABSDR.DLL
WIDGETS.SBK
WINCOMT.DLL
WINCONST.HLP
WRKBNCHT.DLL
Current Directory
CurrentDirectory
w, #>
vgetcurrentDirectory
getCurrentDrive
drive
updateDirectoryInfo
notifyBefore updateDirectoryInfo path
drive = getCurrentDrive()
&":\"&getcurrentDirectory(
CurrentDirectory
tbk_wid_name
C:\TB30\SAMPLES\CONTACT\PROBLEMDOSST\RESWDLGCK
File Name
file name
file name
tbk_wid_name
*.*TACT.ICOO
Button
updateDirectoryInfo
updateFileInfo
selectFile
selectFile
updateFileInfo
updateDirectoryInfo
enterPage
activateInstance
acceptFile
FALSE
Directories and Files
Exit Windows
Ex Select field
Graph widgets
Exploded pie chart
Add and remove
Data widgets
chapter
FALSE
visited
chapterID
Group id 4 of Page id 14
widgets
You can move information back and forth between these two fields. You can also drag the text back and forth.'
Like the old Macintosh Font/DA mover, you can use this control to move information back and forth between a source field and a destination field.
Add_and_Remove
Add_and_Remove
tbk_wid_name
Source
FALSE
allowDrop
buttonClick
buttonStillDown
beginDrag
endDrag
allowDrop sourceObject
FALSE
buttonClick
xenabled
oselectedTextlines <>
drag
beginDrag
endDrag targetobject
Source
tbk_wid_name
Henry
Harriet
HarryrrietHenryet
Henry
Harry
Destination
FALSE
allowDrop
remove
buttonClick
buttonStillDown
beginDrag
remove
endDrag
allowDrop sourceObject
FALSE
buttonClick
xenabled
oselectedTextlines <>
drag
beginDrag
endDrag targetobject
Destination
tbk_wid_name
Harold
Hildagaarddagaardietgaard
destination
Destination
source
buttonClick
enterPage
buttonClick
ZINT thisLine
selectedTextlines
"source"
"Destination" <>
CRLF
"destination"
oenabled
FALSE
notifyBefore
tbk_wid_name
Add >>
remove
Destination
source
buttonClick
enterPage
buttonClick
ZINT thisLine
selectedTextlines
"Destination"
"source" <>
CRLF
oenabled
FALSE
notifyBefore
remove
tbk_wid_name
<< Remove
enterPage
FALSE
Time and date
Data widgets
chapter
FALSE
visited
chapterID
Field id 1 of Page id 15,Field id 0 of Page id 15
widgets
These fields display the current date and time.
AutoDate and AutoTime initialize themselves on the enterPage message with a notifyBefore handler. You can get and set the formats in which they show the date and time with any legal OpenScript time format. The widgets will set their default format and immediately update. For example, type the following script in the Command window: set format of field "autoDate" to "dd/mm/yy".
autoDate
format
enterPage
prop_format
format
prop_format
format
notifyBefore
value
oprop_format
sendNotifyBefore
autoDate
tbk_wid_name
format
borderStyle
tbk_wid_props
list,none,rectangle,shadowed,inset,raised
tbk_wid_values
mm/dd/yy
prop_format
06/20/9420, 1993
autoTime
4 N i
autoTime
tbk_wid_name
format
borderStyle
period
tbk_wid_props
list,none,rectangle,shadowed,inset,raised
tbk_wid_values
h:min:sec AMPM
prop_format
period
timerID
4:11:16 PMM
Auto date:nameer
Auto time:nameer
enterPage
leavePage
FALSE
Win version & DOS version
Data widgets
chapter
chapterID
FALSE
visited
Button id 0 of Page id 16
widgets
This button can retrieve and display the version numbers for DOS and Windows.
The Windows call GetVersion returns the running versions of Windows and DOS in a packed format. This widget makes the link, makes the call, and unpacks the information for you, displaying it in a readable form.
Win_DOS
dmajorNumber
DOS version:
minorNumber
GetVersion
dminorNumber
kernel
Windows version:
GetVersion
verNum
majorNumber
buttonClick
buttonClick
linkDLL "kernel"
DWORD GetVersion()
verNum
WverNum
k65536
DverNum
y65536
majorNumber
minorNumber
dmajorNumber
dminorNumber
"Windows version:" &&
n& "." &
b& CRLF & \
"DOS
`& "." &
-- deal
fdll refCount
unlinkDLL "
Win_DOS
tbk_wid_name
Show Win and DOS versions
FALSE
Win Version & Dos Version
Show off
Searching Field
Slow-Motion
Dialog
dminorNumber
"Windows version:" &&
n& "." &
b& CRLF & \
"DOS
`& "." &
-- deal
fdll refCount
unlinkDLL "
Win_DOS
tbk_wid_name
Show Win and DOS versions
FALSE
Win Version & Dos Version
Show off
x5chapter
Details
Cvisited
zashowOrHideScrollbar
contentBar
Reader
heading
enterPage
ClearChecks
topics
contentBar
enterBackground
contentBar
topics
x5chapter
ainitPage
updateChecks
chapterID
chapterID
topics
~= "Reader"
visited
"heading"
/"contentBar"
chapter
showOrHideScrollbar
J"Details"
FALSE
enabled
disable
"ClearChecks"
chapterID
y-- shouldn't happen, but you
initPage
updateChecks
Widget Label
Widget:
Description Label
Description:
Description
Details Label
Details:ion
Details
showOrHideScrollbar
showOrHideScrollbar
E> 0 --
raised
autoPageName
6Wrealname
enterPage
notifyBefore
realname
autoPageName
tbk_wid_name
tbk_wid_values
Exploded pie charto
Description Label
Name:iption:
enterPage
Widget::
h(,(c(
Table of Contents
contentbar
tableOfContents
leavePage
topics
contentBar
tableOfContents
Table of contents
heading
enterPage
ClearChecks
enterBackground
enabled
B"tableOfContents"
/"contentbar"
up toolbar
pref
/"contentBar"
FALSE
"heading"
"Table
contents"
disable
c"Page"
"ClearChecks"
out,true
ThreeDeeRect
bottomLine
topLine
tableOfContents
chapter1
Navigation widgets
check1
chapter2
The Position Property 59
The Script Recorder 63
The Move Command 68
Move By 58
Move To 57
Moving on Idle 64
topics
pageID
Data widgetsidgetsn
check2
chapter3
Timing Animation 66
Simulating Gravity 67
topics
pageID
Field widgetssta
check3
chapter4
Chickens 26
Goats 25
topics
pageID
Graph widgetssta
check4
chapter5
Slider widgets
check5
chapter6
CBT widgetsets
check6
chapter7
Keyboardseouss
check7
chapter8
Miscellaneous
check8
chapter9
How It Works 26
Hiding and Showing 25
Animating with Resouces 61
Page Flipping 62
Untitled 74
topics
pageID
Widget helptsd
check9
chapter10
How It Works 26
Hiding and Showing 25
Animating with Resouces 61
Page Flipping 62
Untitled 74
topics
pageID
Widget helpus
check10
chapter11
How It Works 26
Hiding and Showing 25
Animating with Resouces 61
Page Flipping 62
Untitled 74
topics
pageID
Widget help
check11
chapter12
How It Works 26
Hiding and Showing 25
Animating with Resouces 61
Page Flipping 62
Untitled 74
topics
pageID
Navigation
check12
chapter13
How It Works 26
Hiding and Showing 25
Animating with Resouces 61
Page Flipping 62
Untitled 74
topics
pageID
Navigation
check13
chapter14
How It Works 26
Hiding and Showing 25
Animating with Resouces 61
Page Flipping 62
Untitled 74
topics
pageID
Navigation
check14
chapter15
How It Works 26
Hiding and Showing 25
Animating with Resouces 61
Page Flipping 62
Untitled 74
topics
pageID
Navigation
check15
chapter16
How It Works 26
Hiding and Showing 25
Animating with Resouces 61
Page Flipping 62
Untitled 74
topics
pageID
Navigation
check16
out,true
ThreeDeeRect
bottomLine
topLine
topic
J%|%OO
raisedField
tbk_wid_name
faceColor
highlightColor
shadowColor
tbk_wid_props
color,hls
color,hls
color,hls
tbk_wid_values
highlight
Table of contents
shadow
Table of contents
Table of contents
Click one of the topics below to view information on that subject.ct.ubject.
Table of Contents
Book Outline
Topics
ClearChecks
enterBackground
contentbar
heading
enterPage
topics
contentbar
heading
widgetIDs
chapterLabel
widgetIDs
updateCheckMarks
initPage
topics
updateChecks
widgetIDs
updateCheckMarks
ainitPage
ainitPage
previous
enable
c"Page"
"ClearChecks"
up toolbar
"heading"
/"contentbar"
-- updates
. sent
4the
entered.
initPage
"chapterLabel"
widgetIDs
updateCheckMarks
FALSE
updateChecks
out,true
ThreeDeeRect
bottomLine
topLine
out,true
ThreeDeeRect
bottomLine
topLine
chapterLabel
raisedField
tbk_wid_name
faceColor
highlightColor
shadowColor
tbk_wid_props
color,hls
color,hls
color,hls
tbk_wid_values
highlight
Graph widgetssgetsn
shadow
Graph widgetssgetsn
Graph widgetssgetsn
Click one of the buttons below
to view information on that widget..t.......
Topics
0,28,19
topicList
"I j!u
topic1
pageId
Simple Bar CharteField, numbers
check1
topic2
pageId
Simple Line ChartField, texters
check2
topic3
pageId
Pie Charton keystroke, numberss 61
check3
topic4
pageId
Exploded pie chartoke, texterss
check4
topic5
pageId
Useful patternsryroke, textbers
check5
topic6
pageId
Spinnersting fieldlesd, Textrs
check6
topic7
pageId
Add and removed fileserlineers
check7
topic8
pageId
Directories and files, Text
check8
topic9
Time and date and underline
check9
topic10
International time and date
check10
topic11
pageId
Calendar drop textversionne
check11
topic12
pageId
Printer Resolution& dropns 25
check12
"I $ !
"I 0!
topic13
pageId
Win version & DOS version 61
check13
topic14
2">",
pageId
Windows or WFWelineuces62
check14
"`#l#
topic15
pageId
Move by commandline4
check15
topic16
pageId
Moving on idlec
check16
topic17
(&6&,
pageId
Tonyc7r7
check17
&('4'
topic18
\'j',
pageId
Barbara8
check18
topic19
topic9r8
check19
topic20
topic108
check20
Topics
contentBar
Table of Contents
10,14
selectChars
24,25
Table of Contents
Data widgets
dfgsdfgshywe
Navigation widgets
Auto Page,Auto Buttons,Folder Tab Widget
myPageList
3,4,5,6
widgetIDs
3,4,5,6
Time and Date
CBT Widgets
True and False
Auto page
Navigation widgets
chapter
FALSE
visited
chapterID
Field id 2 of Page id 3,Field id 1 of Page id 3
widgets
These fields automatically display the current page number and page name.
Both fields use notifyBefore enterPage handlers to set the text of the field to the name and number of the page. In order to see the field update if you name a page or change its name or number, you must send the enterPage message, or navigate away from the page and then return to it.
autoPageNumber
enterPage
notifyBefore
autoPageNumber
tbk_wid_name
tbk_wid_values
autoPageName
enterPage
notifyBefore
autoPageName
tbk_wid_name
tbk_wid_values
Auto page
Auto page number:
Auto page name:r
enterPage
FALSE
Auto Page
Auto Buttons
Content Buttons
jhfhgjfghj
Auto buttons
Navigation widgets
chapter
FALSE
visited
chapterID
Group id 5 of Page id 4
widgets
ToolBook automatically enables and disables these buttons. In the example below, they work on the page, but they should be pasted onto a background.Q
ToolBook uses the same script and user properties to enable and disable these buttons depending on what page the buttons are on. To get and to set handlers determine what page ToolBook navigates to when the button is clicked and the page the button is disabled on. The caption of the button is also the actual command.
Tools30.sbk includes information for widgets of this kind, and you can edit them from that sysBook.
Make sure tools30.sbk is a system book. Right-click the button, click the Custom edit button on the right-click tool bar (just left of the Help button), and then double-click the value for the property in the "Browser" that appears.
AutoButtons
AutoButtons
tbk_wid_name
autoDisable Navigation button
tbk_wid_name
level
direction
disablePage
tbk_wid_props
list,background,book
list,Next,Previous,First,Last
tbk_wid_values
background
prop_level
direction
prop_disablePage
D Z \
autoDisable Navigation button
tbk_wid_name
level
direction
disablePage
tbk_wid_props
list,background,book
list,Next,Previous,First,Last
tbk_wid_values
background
prop_level
direction
First
prop_disablePage
Previous
autoDisable Navigation button
tbk_wid_name
level
direction
disablePage
tbk_wid_props
list,background,book
list,First,Previous,Next,Last
tbk_wid_values
background
prop_level
direction
prop_disablePage
autoDisable Navigation button
tbk_wid_name
level
direction
disablePage
tbk_wid_props
list,background,book
list,Next,Previous,First,Last
tbk_wid_values
background
prop_level
direction
First
prop_disablePage
First
enterPage
FALSE
Tab widget
Widget
Navigation widgets
chapter
FALSE
visited
chapterID
Group id 144 of Page id 5
widgets
This widget can display from 1 to 6 tabs as shown below.o
Pressing a tab sends the tabPressed message with the parameter of the tab number pressed. Currently, this message is handled in the widget; you'll have to forward the message if you want to handle it at the page or background.
The widget should resize gracefully no matter what you do. Use the Group editor to resize the individual tabs. All handlers are in the folder group script. You can set the properties of this widget in tools30.sbk. For details see the "Advanced Widgetry" Help topic.
To change the number of tabs, set numTabs of the widget to a number between 1 and 6.
Note: To add more than 6 tabs, see comments in the folder group script.
To change the height of the tabs, set tabHeight of the widget to a number in page units. (Currently it's at 275.)
To change the selected tab without clicking the tab itself, set tabMode of the widget to the appropriate number.
To change the amount of space between each tab, set tabSpace of the widget to a number in page units.
To change the labels on the tabs, change the caption of the button in the tab group using the right-click menu.
folder
@ OO
R t qp
mytabheight
myNumTabs
myTabMode
myTabSpace
tbk_wid_name
numTabs
tabHeight
tabMode
tabSpace
tbk_wid_props
tbk_wid_values
obtype
tabHighlight
tabLabel
obtype
tabHighlight
tabLabel
obtype
tabHighlight
tabLabel
obtype
tabHighlight
tabLabel
obtype
tabHighlight
tabLabel
obtype
tabHighlight
tabLabel
highlight
FALSE
Validate on leaveField, Text
Field Widgets
Notify Messages
splash
Content buttons
FALSE
visited
Navigation widgets
chapter
chapterID
Group id 146 of Page id 6,Field id 36 of Page id 6
widgets
The buttons below act as a table of contents or an outline.
The chapter headings on the left recognize their associated pages. The "buttons" (they are actually fields) on the right navigate to the pages with those names. Use the following command in the Command window to use the field at the upper-right to set the two levels of the outliner: set outline of group tableOfContents to text of field "outline". Type Ctrl+Tab to indent subordinate items below the top-level text.
outline
outline
tbk_wid_name
Poodles
Great Danes
So-so Danes
Siamese cats
Fussy cats
Decorator cats
Cats who love dogs
Gold fish
Silver fish
Sushiiiiiiiih sushihhhhhh
tableOfContents
tableOfContents
tbk_wid_name
H!M >
Chapters
chapter1
Poodles
Great Danes
So-so Danes
topics
pageID
Dogse Animations
chapter2
pageID
Siamese cats
Fussy cats
Decorator cats
Cats who love dogs
topics
Catsng Objectsns
chapter3
Gold fish
Silver fish
Sushi
topics
pageID
FishsesScriptsls
chapter4
pageID
Chickens 26
Goats 25
topics
Farm Animals
chapter5
chapter5
chapter6
chapter6?
chapter7
chapter7
chapter8
chapter8
Topics
topic1
pageId
Poodles cats 26 59
topic2
pageId
Great DanesShowing 253
topic3
pageId
So-so Danesatsanesouces 61
topic4
pageId
Cats who love dogs 62
topic5
pageId
Move To 57
topic6
pageId
Moving on Idle 64
topic7
pageId
Tonyc7r7
topic8
pageId
Barbara8
topic9
topic9r8
topic10
topic108s
bracket
joiner
FALSE
System
Arial
MS Sans Serif
MS Sans Serif
System
Arial
Courier New
Arial
Arial
Times New Roman
Times New Roman
Times New Roman
Times New Roman
Times New Roman
MS Sans Serif
2,7,18,32,35,38,60,65,71
MS Sans Serif
topics
Arial
2,7,18,32,35,38
topicIDs
System
sicWidgetBOX
sicWidgetINIT
Arial
MS Sans Serif
MS Sans Serif
System
MS Sans Serif
Arial
MS Sans Serif
Arial
Slider widgets
CBT widgets
Keyboards
Miscellaneous
Widget help
itandCleanupINIT
MS Sans Serif
2,7,18,32,35,38,60,65
help
Description contains "number"
Description
Description
Text of RecordField "Description" contains "number"
2,7,18,32,35,38,60,65
MS Sans Serif
Courier New
sicalSymbols
2,7,18,32,35,38,60,65
2,7,18,32,35,38,60,65
2,7,18,32,35,38,60,65
2,7,18,32,35,38,60,65
2,7,18,32,35,38,60,65
MS Sans Serif
mes New Roman
cellaneous
Widget help
GROUPBOX Notify Messages,G39,Notify Messages
BUTTON More,B35,TRUE
BUTTON Back,B36,TRUE
BUTTON Cancel,B37,TRUE
STATIC Notify Message,S38,Notify messages are useful for letting the widget know what is going on without modifying any scripts
BITMAP Notify Messages,p65,bitmap "Notify"
tifyMessagesINIT
524480,5,25,25,169,127,,,Init and Cleanup,8,MS Sans Serif,Init and Cleanup,9,0,157,93,39,1342177287,128,Initialization and Cleanup,0,More,17,100,47,14,35,1342242816,128,&More,0,Back,69,100,42,14,36,1342242816,128,&Back,0,Cancel,114,100,43,14,37,1342242816,128,&Cancel,0,Init and cleanup,14,16,147,70,38,1342177280,130,Text,0
itAndCleanupBOX
GROUPBOX Init and Cleanup,G39,Initialization and Cleanup
BUTTON More,B35,TRUE
BUTTON Back,B36,TRUE
BUTTON Cancel,B37,TRUE
STATIC Init and cleanup,S38,We can use "notifyBefore copy" handlers to initialize the widget as it is being copied, and possibly to initialize the book it is being pasted into.
We can also use "notifyAfter paste" or "notifyAfter make" handlers to initialize and cleanup the new widget
itAndCleanupINIT
524480,5,25,25,237,189,,,Advanced Widgetry,8,MS Sans Serif,Advanced Widgetry,11,3,217,151,39,1342177287,128,Advanced Widgetry,0,More,46,159,47,14,35,1342242816,128,&More,0,Back,99,159,42,14,36,1342242816,128,&Back,0,Cancel,144,159,43,14,37,1342242816,128,&Cancel,0,Advanced,22,21,202,122,38,1342177280,130,Text,0
STATIC Advanced,S38,Tools30.sbk knows quit a bit about widgets. It can tell if an object is a widget when that object has the user property "tbk_wid_name" set to some value. It also knows about two other properties:
1) tbk_wid_props is a carriage-return line-feed delimited list of properties (user properties) that the widget has and that can be initialized and set according to the parameters of property # 2.
2) tbk_wid_values is a CRLF list with the same number of textlines as tbk_wid_props. Textlines in the two properties correspond. The first item of each textline in tbk_wid_values declares what kind of values the property can take. This can be any of "custom,text,list,boolean,na." The next items in the list will be the legal values for that property.
Widgets
Tool Bar
Page "ContentBar"
copyDialog
py a Widget
Page "copyDialog"
Book Outline
Book Outline
Page "Book Outline"
Select Topic
Select Topic
Page "Select Topic"
Widgets
widgetProperties
Advanced Widgetry
ge "Dialog"
Widget Properties
page "widgetProperties"
Select a Widget to Check.
splash
Page id 92
Page "splash"
Page id 78 of Book "C:\TBEA\SAMPLES\WIDGETS\WIDGT67.TBK"
Useful patterns
Data widgets
chapter
chapterID
FALSE
visited
Field id 4 of Page id 79,Field id 1 of Page id 79
widgets
This widget recognizes data entered in a standard pattern of numbers.
Here are two widgets ready to go into your application. They both validate the data on keystroke, the first will only accept a valid social security number, the second a valid telephone number.
A qwerty keyboard that returns the letter that is clicked.U
Clicking the buttons in the keyboard will display text in the field.
N.B. This widget has problems drawing itself in high resolution mode (1024 by 768 or greater) when using large fonts. You can fix this by adjusting the u
QWERTY_Keyboard
QWERTY_Keyboard
tbk_wid_name
input
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
ALPHA
txClassName
Enter
NON-ALPHA
txClassName
NON-ALPHA
txClassName
NON-ALPHA
txClassName
NON-ALPHA
txClassName
lT`TiT
NON-ALPHA
txClassName
NON-ALPHA
txClassName
Caps Lock
NON-ALPHA
txClassName
NON-ALPHA
txClassName
NON-ALPHA
txClassName
NON-ALPHA
txClassName
NON-ALPHA
txClassName
NON-ALPHA
txClassName
NON-ALPHA
txClassName
NON-ALPHA
txClassName
NON-ALPHA
txClassName
NON-ALPHA
txClassName
NON-ALPHA
txClassName
NON-ALPHA
txClassName
NON-ALPHA
txClassName
Shift
NON-ALPHA
txClassName
NON-ALPHA
txClassName
NON-ALPHA
txClassName
NON-ALPHA
txClassName
NON-ALPHA
txClassName
Shift
NON-ALPHA
txClassName
NON-ALPHA
txClassName
NON-ALPHA
txClassName
NON-ALPHA
txClassName
NON-ALPHA
txClassName
enterPage
FALSE
CDBSE&File
&Open... Ctrl+O
&Save Ctrl+S
Save &As...
saveas
&Import...
import
&Export...
export
Print Set&up...
printsetup
&Print Pages... Ctrl+P
printpages
Prin&t Report...
printreport
Send &Mail...
sendmail
&Run...
E&xit Alt+F4
&Edit
&Undo Ctrl+Z
Cu&t Ctrl+X
&Copy Ctrl+C
&Paste Ctrl+V
paste
C&lear Del
clear
Select &All Shift+F9
selectall
Select Pa&ge Shift+F12
selectpage
&Size to Page F11
sizetopage
F&ind... F5
Re&place...
replace
Aut&hor F3
author
&Text
&Character... F6
character
&Paragraph... F7
paragraph
&Regular Ctrl+Space
regular
&Bold Ctrl+B
&Italic Ctrl+I
italic
&Underline Ctrl+U
underline
Stri&keout Ctrl+K
strikeout
Superscrip&t/Subscript
superscriptSubscript
&Normal Script
normalscript
Su&bscript Ctrl+L
subscript
Su&perscript Ctrl+Shift+L
superscript
&Show Hotwords F9
showhotwords
&Page
&Next Alt+Right
&Previous Alt+Left
previous
&First Alt+Up
first
&Last Alt+Down
&Back Shift+F2
&History... Ctrl+F2
history
N&ew Page Ctrl+N
newpage
&Help
&Contents F1
contents
Status &Bar F12
statusbar
widgets
&File
&Open... Ctrl+O
&Save Ctrl+S
Save &As...
saveas
Print Set&up...
printsetup
&Print Pages... Ctrl+P
printpages
Prin&t Report...
printreport
Send &Mail...
sendmail
&Run...
E&xit Alt+F4
&Edit
&Copy Ctrl+C
myCopy
Copy &All Ctrl+Shift+C
copyAll
&Paste Ctrl+V
myPaste
Clear Chec&ks
resetChecks
Clear the check marks from the table of contents and all the topic pages.
&Size to Page F11
sizetopage
F&ind... F5
Au&thor F3
author
&Page
&Next Alt+Right
&Previous Alt+Left
previous
&First Alt+Up
first
&Last Alt+Down
&Back Shift+F2
&History... Ctrl+F2
history
&Help
&About...
About
&Contents... F1
contents
&What's a Widget?...
widgetHelp
Status &Bar F12
statusbar
undo Ctrl+Z
cut Ctrl+X
copy Ctrl+C
paste Ctrl+V
clear Del
command Shift+F3
Save Ctrl+S
SaveDialog
Open Ctrl+O
OpenDialog
Properties Shift+F6
Properties
Preview Dialog Ctrl+W
ShowDialog
group Ctrl+G
group
edit editor F3
Browse
highlightColor
value
shadowColor
faceColor
sized
spupp
syspageunitsperpixel
syssuspendmessages
value
month
k12) + 1
< 1
> 12
&&"out
range 1
year
(+ 1)
< 0
> 99
daysInMonth
m =
y =
m <> 2
"31,28,31,30,31,30,31,31,30,31,30,31"
k4 = 0
k100 <> 0)
k400 = 0)
"month"
"day"
"year"
value
ZLONG days
= daysInMonth()
5) + 1
%"00"
%"00"
< 1
outside range 1
%"00"
k12) + 1
%"00"
%"00"
< 1
> 12
&&"out
%"00"
+ 1)
%"00"
%"00"
< 0
> 99
%"00"
initialize
4OBJECT newHotwordID
%"mm / dd / yy"
m =
m <> 2
"31,28,31,30,31,30,31,31,30,31,30,31"
y =
k4 = 0
k100 <> 0)
k400 = 0)
value
month
k12) + 1
< 1
> 12
&&"out
range 1
year
(+ 1)
< 0
> 99
daysInMonth
m =
y =
m <> 2
"31,28,31,30,31,30,31,31,30,31,30,31"
k4 = 0
k100 <> 0)
k400 = 0)
sortSelf
ZARRAY STRING dataArray[]
ZLONG numberLines, i
= TRUE
fill
B] order
4 = dimensions (
startProfile("quickSort")
quickSortTextlines
, 1,
endProfile()
i] &CRLF
= FALSE
, lo, hi
vKey, vSwapBuffer
vSplitPoint, i
ZSTACK paramStack
clo < hi
lo + 1
i] <
i] =
lo] =
- lo > hi -
) = 0
notifyBefore
odisablePage && "
" &&
olevel)
oenabled
FALSE
buttonClick
" &&
value
oprop_level
"invalid
widget:"&&
G &CRLF&\
"must be ""
direction
"Next,Previous,First,Last"
"", ""
"", ""
oprop_disablePage
&CLRF&\
notifyBefore
odisablePage && "
" &&
olevel)
oenabled
FALSE
buttonClick
" &&
value
oprop_level
"invalid
widget:"&&
G &CRLF&\
"must be ""
direction
"Next,Previous,First,Last"
"", ""
"", ""
oprop_disablePage
&CLRF&\
notifyBefore
odisablePage && "
" &&
olevel)
oenabled
FALSE
buttonClick
" &&
value
oprop_level
"invalid
widget:"&&
G &CRLF&\
"must be ""
direction
"Next,Previous,First,Last"
"", ""
"", ""
oprop_disablePage
&CLRF&\
notifyBefore
odisablePage && "
" &&
olevel)
oenabled
FALSE
buttonClick
" &&
value
oprop_level
"invalid
widget:"&&
G &CRLF&\
"must be ""
direction
"Next,Previous,First,Last"
"", ""
"", ""
oprop_disablePage
&CLRF&\
"hour"
"Minute"
"AMPM"
minute
value
#+ 1)
%"00"
%"00"
< 0
> 59
outside range 0
%"00"
k12) + 1
%"00"
%"00"
< 1
> 12
&&"out
%"00"
+ 1)
%"00"
%"00"
< 0
> 59
%"00"
initialize
4OBJECT newHotwordID
%"hh :
j: sec
sortSelf
ZARRAY dataArray[]
ZSTRING sortedText
array
fill
B] order
quickSort
-- convert
dimensions(
i] & CRLF
trailing
-- update
o= default
-- The
tthree handlers
aup a Standard recursive QuickSort.
-- Keep
mind that arrays are passed
Hreference,
Hvalue.
fArray[]
4s_noSwap
quickSrt
), 1,
dlo, hi
hi > lo
j, lo, ((lo+hi)
(lo+1)
i] <
s_noswap
quicksrt
, lo,
+1,hi
Ztemp
-- use
inserting a single
U. Will maintain
insertLine newLine
insertLineAux(
-- inserts
txt, maintaining
-- works only
already
ending
ZinsertSpot
midPoint
middleLine
--
looking
)values less than current
--
Kgreater
--
exists
> tlc
-- This handler jumps the slider
each tick mark
mouse
moved
Zarray x[5], pin[4]
-- find midpoint between
0i] = (((
U(i+1))-\
Ui))/2 )+(
x[i] = (
Ui)-82
pos =
" = x[1]
" = x[2]
" = x[3]
When
" = x[4]
" = x[5]
"track"
pinNumber()
-- This handler jumps the slider
each tick mark
mouse
moved
Zarray x[5],
-- find midpoint between
lines renamed
allow
;widgets on
[i] = (((
U(i+6))-\
U(i+5)))/2 )+(
U(i+5))
x[i] = (
U(i+5))-82
pos =
< pin[1]
"slider2" = x[1]
When
-- moves the slider
xPix
sysPageUnitsPerPixel
sliderMin
sliderMax
scale
sliderBounds
nearestPupp(
oldP
nearestPUPP(
pos -
oldMouseX
sliderPos
mysliderPos
startSliderMove
leftMButton
primaryMouseButton() --
S-handed mousing
newMouseX
newP
b(x1,
9-dx),x2-w)
n-x1)*
)/(x2-x1-w)+
sliderMove
mySliderPos
endSliderMove
updateDB
stl =
oselectedTextLines
enabled
"allcontrols"
B"mainEdit"
B"mainDelete"
t =
info =
9,t)+1
U(t)
datatype =
pRef =
dataType
combobox "editType"
"Field"
mode
"options"
"Accept
"integer"
"Allow numbers only"
"Read
"boolean"
"Dropdown List"
"dropdown list"
"logical"
"custom"
"Custom"
B"values"
"Property" &&
9,t)-1
t & ":"
updateFromDB
t =
tabloc =
9,t)+1
dtype =
"accept
retval = "
--
"read
edittype
& "," &
U(t)
buttonClick
keyDownArrow
keyLast
initDLG sel
Zproplist
nm = tbk_wid_name
propList = getPropListFromHandlers(
props = tbk_wid_props
vals = tbk_wid_values
propcount =
propCount
curProp =
curval =
curVal
"widname"
selectedtextlines
updateDB
s =
C( s)
curline =
--
trailing
updateWidget sel
"Uh-oh. Nothing
nm =
"You must
pthe widget
4you can
tlcount =
curLine =
tabloc =
close
mode
value
Zvallist
fref =
"listItems"
"logical"
enabled
origVal
icount =
updateButtons
selectedTextLines
Zretval
"boolean"
"listitems"
C(t)
-- Tim Pearson, Asymetrix 94
customEdit
4 s_answerMessages
Z init, box
linkDLL sysToolBookDirectory & "tb30dlg.dll"
STRING DialogCallback (WORD,
& GetValue (
?SetValue (
YGetnListBoxSelection(
xGetControlText (
INT SetControlText (
-endTBKDialog (
= ",G3607,Answers:
,S3603,
Send When Chosen:
LISTBOX answers,L3596,TRUE" & CRLF &
"FALSE
EDIT message,E3604,
BUTtoN ok,B1,
J,B3606,
box = "524480,6,25,25,186,74,,,
True
False,8,MS Sans Serif,,2,3,130,55,3607,1342177287,128,