pdwidgets.widgets.dialog

Modal dialog widget.

class pdwidgets.widgets.dialog.Dialog(parent, message='', title=None, buttons=None, on_result=None, fg=None, bg=None, w=None, h=None, font=None, scrim=None)[source]

Bases: Widget

Modal message box with title, body, and action buttons.

show()[source]

Show the dialog and grab modal pointer capture.

hide_dialog()[source]

Hide the dialog and release modal pointer capture.

draw(area=None)[source]

Paint the opaque scrim behind the card.

A full draw fills the whole screen; a child’s parent.draw(child.area) request fills just that sub-region with the scrim so the card’s children are not erased.