Balloon
This command will create a pop-up message on the screen that can last indefinitely or for some number of seconds.
As long as the App.Balloon call passes in either a valid Text, Title, or IconId, then it will be displayed with whatever combination of buttons requested. Original default behavior is kept the same when calling App.Balloon with just the original parameters filled in.
Group: Application-Based Extension
Syntax: App.Balloon(sText, nDuration)
sText (String) the message to display.
nDuration (Long) the number of seconds the message should display. Set to zero to clear the balloon or -1 for it to display indefinitely. If -1 is used, use a Balloon set to 0 duration to remove it.
Note: As of 5.2.5.x, "Balloon" was added as an object so it does not have to be used with the App object. The following parameters were added in 5.2.5.x
The format for calling this function with all optionals filled in will look like:
App.Balloon(sText, iDuration, sTitle, sImg, bClose, bAnimate, dWidthPercent, iEndLocation, iStartLocation)
Parameter | Description |
---|---|
Animate | bool value as to whether the balloon should animate moving across the screen. If EndLocation isn’t set then it will move to the top of the form so that it is just below the form header, and if StartLocation is not set then it starts at the original centered location. Default value is false. |
CloseButton | bool value as to whether to have a close button added to the balloon as an additional column. Default value is false |
EndLocation | int value for the form-coordinate Y location that the balloon’s animation will stop at. If animation is false then this has no effect and a default value of -1 means that it will stop at the form’s heading area |
IconId | the name of the image to use as an icon from RFImages. This is optional and the default value of empty string makes the balloon draw with no image. |
StartLocation | int value for the form-coordinate Y location of where the balloon should first be drawn at with the top of the dialog aligned to that location. A default value of -1 has it starting at the original location of where it is centered at. |
Title | the message’s title text, default value is empty and if left empty then the balloon’s layout will only use one row. The title’s text is set to bold style and +2 font size compared to the theme size |
WidthPercent | double value restricted between 0.0 and 1.0 that is the percent of the form’s width to lock the balloon’s size to so that it then only autosizes the height of the balloon. The default value of 0.0 lets it autosize the width as well as the height like it originally did. |
Example:
Example 2
App.Balloon(“An error has occurred”, 3, “Error!”, “ErrorIcon”, True, True, 0.6, 200, 0)
Version Supported: RFgen 5.0 and newer.
Note: RFgen 5.24 added these parameters: Animate, CloseButton, EndLocation, IconId, StartLocation, Title, and WidthPercent.