Enumerations #
Name | Values |
---|---|
MessagePositions | Top |
TopLeft | |
TopCenter | |
TopRight | |
Center | |
CenterLeft | |
CenterRight | |
Bottom | |
BottomLeft | |
BottomCenter | |
BottomRight |
Constants #
This class exposes no constants.
Events #
Name | Parameters | Return Type | Description |
---|---|---|---|
ButtonClicked | theMessage as GraffitiWebAlertMessage theButton as GraffitiWebAlertButton | None | Raised when the user has clicked one of the defined buttons. |
MessageClosed | theMessage as GraffitiWebAlertMessage | None | Raised when an alert has been closed. |
MessageShown | theMessage as GraffitiWebAlertMessage | None | Raise when an alert has been shown. |
Methods #
Name | Parameters | Return Type | Description |
---|---|---|---|
CloseAll | None | None | Closes all currently open messages. |
CloseMessage | theMessage as GraffitiWebAlertMessage | None | Closes the specified message. |
CloseMessage | messageName as String | None | Closes the message whose name matches messageName. |
Show | theMessage as GraffitiWebAlertMessage | None | Shows the specified message. |
Properties #
Name | Type | Default Value | Description |
---|---|---|---|
ForceZIndex | Boolean | False | When True, the alert controller will automatically calculate the correct z-index to keep GraffitiAlertMessages above all other controls on the page, MessageBoxes, WebDialogs, etc. |
Notes #
Multiple Alerts #
The underlying library does not support stacking along the z axis. If you find yourself needing to do this, you may need to reevaluate your design as this can be confusing for users (just as showing many MessageBoxes or DesktopWindow modals may be a problem). A potential solution may be to use a PagePanel to show alternate content within the primary alert and react accordingly to button presses based on the state of the container.
Examples #
Handling Button Clicks #
GraffitiAlert has an event for catching when GraffitiAlertButtons are clicked on the GraffitiAlertMessage instance.
A typical implementation may look like this:
Sub ButtonClick(theMessage as GraffitiAlertMessage, theButton as GraffitiAlertButton) Handles ButtonClick select case theMesage.Name case "yesNo" if theButton.Name = "yes" then ' User clicked yes. else ' User clicked no. end if case "yesNoCancel" if theButton.Name = "yes" then ' User clicked yes. elseif theButton.Name = "no" then ' User clicked no. else ' User clicked cancel. end if end select End Sub