Tkinter: invoke event in main loop

后端 未结 2 1748
生来不讨喜
生来不讨喜 2020-12-01 12:26

How do you invoke a tkinter event from a separate object?

I\'m looking for something like wxWidgets wx.CallAfter. For example, If I crea

2条回答
  •  醉梦人生
    2020-12-01 13:19

    Here below just some doc and link to better understand Bryan's answer above.

    function description from New Mexico Tech :

    w.event_generate(sequence, **kw)

    This method causes an event to trigger without any external stimulus. The handling of the event is the same as if it had been triggered by an external stimulus. The sequence argument describes the event to be triggered. You can set values for selected fields in the Event object by providing keyword=value arguments, where the keyword specifies the name of a field in the Event object.

    list and description of tcl/tk event attributes here

提交回复
热议问题