<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_widget(self, canvas):
 """Call this method with the Tkinter canvas that will be used for the display. """

        self.tkcanvas = canvas

        canvas.bind("<Configure>", self._resize_cb)
        width = canvas.winfo_width()
        height = canvas.winfo_height()

        # see reschedule_redraw() method
        self._defer_task = TkHelp.Timer(tkcanvas=canvas)
        self._defer_task.add_callback('expired',
                                      lambda timer: self.delayed_redraw())
        self.msgtask = TkHelp.Timer(tkcanvas=canvas)
        self.msgtask.add_callback('expired',
                                  lambda timer: self.onscreen_message(None))

        self.configure_window(width, height)