Dear List
In the code below, when entering the dialog, or when clicking the
"Display &All Routes" checkbox the handler ENABLE_STOPS_TOO is invoked
and, to my mind, should enable or disable the "Display &Stops Too"
checkbox, depending on glAllRoutes.
But, of course it doesn't. Can anyone tell me why, please?
Sub DISPLAY_ROUTE_DIALOG
Call GET_PLOTTED_ROUTES
DIALOG
Title "Display or Hide Routes"
Calling ENABLE_STOPS_TOO
Control CheckBox
Title "Display &All Routes"
Calling ENABLE_STOPS_TOO
Value glAllRoutes
Into glAllRoutes
Control CheckBox
ID STOPS_TOO_BUTTON_ID
Title "Display &Stops Too"
Value FALSE
Into glStopsToo
Control StaticText
Title "Select a Route to display from List:"
Control PopUpMenu
Title from Variable gaRouteNames
Value 1
Into gnSelID
Control CheckBox
Title "&Hide All Routes"
Value glHideRoutes
Into glHideRoutes
Control OKButton
Control CancelButton
If CommandInfo(CMD_INFO_DLG_OK) Then
Set map redraw off
Call REMOVE_PLOT_HILITE ' Disappear any
highlighted zones-plotted route layer
Call REMOVE_STOPS_HILITE ' Disappear any
highlighted Route's Stops layer
Call DISPLAY_WHAT_ROUTES
Set map redraw off
End If
End Sub
'________________________________________________
Sub ENABLE_STOPS_TOO
If glAllRoutes then
Alter Button ID STOPS_TOO_BUTTON_ID Disable ' Disable Stops
Stops Too button of Display route Dialog
Else
Alter Button ID STOPS_TOO_BUTTON_ID Enable ' Enable Stops
Too button of of Display route Dialog
End if
End Sub
TIA
Terry