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.
| Parameter | Type | Description |
|---|---|---|
parent | Widget | Containing 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.
| Parameter | Type | Description |
|---|---|---|
body | string | Body string. |
SetTitle(string title)
def SetTitle(self, title: str) -> None:
Set the dialog title text.
| Parameter | Type | Description |
|---|---|---|
title | string | Title string. |