Custom Popup Widget

TkInter not include a popup feature, this is a custom one.

class ubtdriver.tools.popup.CustomPopup(parent, text, command=None)[source]

Bases: sphinx.ext.autodoc.importer._MockObject

Custom popup message.

__del__(*args, **kwargs)[source]

Unbind events.

__init__(parent, text, command=None)[source]

Create popup.

Parameters:
  • parent (TkInter element) – Widget that will trigger the popup message.
  • text (str) – The message tha will be displayed.
  • command (function, optional) – The callback funtion when a click event is generated.
__on_click__(*args, **kwargs)[source]

Callback function.

__on_display__(event)[source]

Show popup.

Parameters:event (TkInter event) – Mouse event that contains the coordinates for positioning the popup.
__on_remove__(*args, **kwargs)[source]

Destroy popup.