Skip to content

Animation

Universal tkinter animations for Widgets, and Canvas items

Parameters

NameTypeDescription
widgettkinter.WidgetThe widget to bind the animation to.
TagOrIdstrThe tkinter.Canvas item tag or id. WIDGET must be the canvas.

Methods

hide

Hide the matched widgets.

Parameters

NameTypeDescription
durationintA string or number determining how long the animation will run.
easingstrA string indicating which easing function to use for the transition.
donecommandCallableA function to call once the animation is donecommand, called once per matched element.

show

Display the matched widgets.

Parameters

NameTypeDescription
durationintA string or number determining how long the animation will run.
easingstrA string indicating which easing function to use for the transition.
donecommandCallableA function to call once the animation is donecommand, called once per matched element.

toggle

Display or hide the matched widgets.

Parameters

NameTypeDescription
durationintA string or number determining how long the animation will run.
easingstrA string indicating which easing function to use for the transition.
donecommandCallableA function to call once the animation is donecommand, called once per matched element.

animate

Perform a custom animation of a set of CSS kw.

Parameters

NameTypeDescription
durationintA string or number determining how long the animation will run.
easingA string indicating which easing function to use for the transition.
queuebool
stepcommandCallable
progresscommandCallable
donecommandCallableA function to call once the animation is donecommand, called once per matched element.

clear_queue

Remove from the queue all iteduration that have not yet been run.

Parameters

NameTypeDescription
namestrA string containing the name of the queue. Defaults to fx, the standard effects queue.

delay

Set a timer to delay execution of subsequent iteduration in the queue.

Parameters

NameTypeDescription
durationintAn integer indicating the number of milliseconds to delay execution of the next item in the queue.
namestrA string containing the name of the queue. Defaults to fx, the standard effects queue.

dequeue

Execute the next function on the queue for the matched widgets.

Parameters

NameTypeDescription
namestrA string containing the name of the queue. Defaults to fx, the standard effects queue.

finish

Stop the currently-running animation, remove all queued animations, and donecommand all animations for the matched widgets.

Parameters

NameTypeDescription
queuestrThe name of the queue in which to stop animations.

queue

Show or manipulate the queue of functions to be executed on the matched widgets.

Parameters

NameTypeDescription
namestrA string containing the name of the queue. Defaults to fx, the standard effects queue.

stop

Stop the currently running animation on the matched widgets.

Parameters

NameTypeDescription
stop_queueboolA Boolean indicating whether to remove queued animation as well. Defaults to false.
jump_to_endboolA Boolean indicating whether to donecommand the current animation immediately. Defaults to false.

fade_in

Display the matched widgets by fading them to opaque.

Parameters

NameTypeDescription
durationintA string or number determining how long the animation will run.
easingstrA string indicating which easing function to use for the transition.
donecommandCallableA function to call once the animation is donecommand, called once per matched element.
queueboolA Boolean indicating whether to place the animation in the effects queue. If false, the animation will begin immediately.

fage_out

Hide the matched widgets by fading them to transparent.

Parameters

NameTypeDescription
durationintA string or number determining how long the animation will run.
easingstrA string indicating which easing function to use for the transition.
donecommandCallableA function to call once the animation is donecommand, called once per matched element.
queueboolA Boolean indicating whether to place the animation in the effects queue. If false, the animation will begin immediately.

fade_to

Adjust the opacity of the matched widgets.

Parameters

NameTypeDescription
opacityfloatA number between 0 and 1 denoting the target opacity.
durationintA string or number determining how long the animation will run.
easingstrA string indicating which easing function to use for the transition.
donecommandCallableA function to call once the animation is donecommand, called once per matched element.

fade_toggle

Display or hide the matched widgets by animating their opacity.

Parameters

NameTypeDescription
durationintA string or number determining how long the animation will run.
easingstrA string indicating which easing function to use for the transition.
donecommandCallableA function to call once the animation is donecommand, called once per matched element.
queueboolA Boolean indicating whether to place the animation in the effects queue. If false, the animation will begin immediately.

slide_down

Display the matched widgets with a sliding motion.

Parameters

NameTypeDescription
durationintA string or number determining how long the animation will run.
easingstrA string indicating which easing function to use for the transition.
donecommandCallableA function to call once the animation is donecommand, called once per matched element.
queueboolA Boolean indicating whether to place the animation in the effects queue. If false, the animation will begin immediately.

slide_up

Hide the matched widgets with a sliding motion.

Parameters

NameTypeDescription
durationintA string or number determining how long the animation will run.
easingstrA string indicating which easing function to use for the transition.
donecommandCallableA function to call once the animation is donecommand, called once per matched element.
queueboolA Boolean indicating whether to place the animation in the effects queue. If false, the animation will begin immediately.

slide_toggle

Display or hide the matched widgets with a sliding motion.

Parameters

NameTypeDescription
durationintA string or number determining how long the animation will run.
easingstrA string indicating which easing function to use for the transition.
donecommandCallableA function to call once the animation is donecommand, called once per matched element.
queueboolA Boolean indicating whether to place the animation in the effects queue. If false, the animation will begin immediately.

Not associated with or approved by Mojang Studios or Microsoft