Purpose
Make the content of a message more noticeable

Sometimes the message sent with the "Message" instruction from a GuiXT script is somewhat inconspicuous and can easily be ignored by the user. In such cases, it is advisable to make the message a little more eye-catching.

Example: We start with the message

Message "DO NOT Remove Packaging!"  title="ESD Warning"

 

Solution 1

Make the content of the message box a little more eye-catching and force the OK button to be pressed.

Example

Clear V[esd_msg]

Set V[esd_msg] "&V[esd_msg]DO NOT Remove Packaging!"

Set V[esd_msg] "&V[esd_msg]\n-------------------------------------"

Set V[esd_msg] "&V[esd_msg]\n\nThis is an ESD part (electrostatic discharges)"

Set V[esd_msg] "&V[esd_msg]\n\nPlease note:"

Set V[esd_msg] "&V[esd_msg]\nOur ESD packaging keeps our electronic components safe from"

Set V[esd_msg] "&V[esd_msg] electrostatic discharges.  Do not remove the packaging.“


Message
"&V[esd_msg]" type="W" title="ESD Warning" -ok

 

Solution 2 (requires GuiXT Controls)

Create a suitable image (.jpg or .png) or HTML page and display it with the WebView command, option "-floating".

Example (image)

 

WebView (2,12) (15,52) "ESD.jpg"  _

     name="esd_warning" title="ESD Warning"  -floating

 

Example (HTML page)


Unlike the image, the HTML approach allows us to add interactive functions such as a clickable link.

Please note: If you store the GuiXT script and the HTML pages for productive use in the SAP MIME repository, you must address all files embedded in the HTML page, for example images, beforehand in a "CacheFile" statement so that these are also loaded from the MIME repository into the GuiXT cache. Otherwise they would be missing in the display of the HTML file, as WebView cannot access the SAP MIME repository directly:

CacheFile "esd.png" 

 

WebView (2,2) (20,80) "esd_warning.html"  _

   name="esd_warning" title="ESD Warning"  -floating

Another option is to store files in the HTML page, for example image files, in Base64 notation directly in the HTML file instead of using separate image files. There are online tools for converting image files into Base64 format.

Components GuiXT (+ Controls for solution 2)