Skip to main content

MessageBox Class

Package: GHIElectronics.Endpoint.UI
Namespace: GHIElectronics.Endpoint.UI

Modal dialog with title, body text, and footer buttons. Add buttons with MessageBox.AddButton; each returns a handle whose Clicked event you subscribe to. Call MessageBox.Hide to dismiss.

class MessageBox(Widget): ...

Constructors​

MessageBox(Widget parent)​

def __init__(self, parent: Widget):

Create a message box inside parent.

ParameterTypeDescription
parentWidgetContaining widget (typically the active UI.Screen).

Methods​

AddButton(string text)​

def AddButton(self, text: str) -> MessageBoxButton:

Add a footer button; returns a handle to subscribe to its Clicked event.

Returns MessageBoxButton

Hide()​

def Hide(self) -> None:

Dismiss the dialog without destroying it; call again by making the Widget.Visible parent re-show it.

SetBody(string body)​

def SetBody(self, body: str) -> None:

Set the dialog body text.

ParameterTypeDescription
bodystringBody string.

SetTitle(string title)​

def SetTitle(self, title: str) -> None:

Set the dialog title text.

ParameterTypeDescription
titlestringTitle string.