tcltk (version 3.5.2)

tclServiceMode: Allow Tcl events to be serviced or not

Description

This function controls or reports on the Tcl service mode, i.e., whether Tcl will respond to events.

Usage

tclServiceMode(on = NULL)

Arguments

on

(logical) Whether event servicing is turned on.

Value

The value of the Tcl service mode before the call.

Details

If called with on == NULL (the default), no change is made.

Note that this blocks all Tcl/Tk activity, including for widgets from other packages. It may be better to manage mapping of windows individually.

Examples

Run this code
# NOT RUN {
## see demo(tkcanvas) for an example
# }
# NOT RUN {
oldmode <- tclServiceMode(FALSE)
# Do some work to create a nice picture.
# Nothing will be displayed until...
tclServiceMode(oldmode)
# }
# NOT RUN {
## another idea is to use tkwm.withdraw() ... tkwm.deiconify()
# }

Run the code above in your browser using DataCamp Workspace