Gseos.MessageBox
Previous  Top  Next

MessageBox(strText, [strTitle="GSEOS"], [wButtons=MB_OK], [wIcon=MB_ICONINFORMATION], [bModeless=False])

Displays a message box. The text strTitle is displayed in the title bar of the message box. The text strText is displayed as the message prompt. The standard windows buttons can be specified with the wButtons parameter. An additional icon can be displayed and is specified with the wIcon parameter. This message box can be modal or modeless. As a modal window you can't access any other GSEOS user interface elements until you close the message box. As a modeless window the GSEOS user interface remains responsive.

ParameterDescription     
strTextThe message prompt text.  
strTitleOptional, The caption bar text. Default: GSEOS.      
wButtonsOptional, specifies the buttons to display. One of the following attributes can be specified: MB_OK, MB_OKCANCEL, MB_RETRYCANCEL, MB_YESNO, MB_YESNOCANCEL. The default is MB_OK.  
wIcon Optional, specifies an icon to display. MB_ICONEXCLAMATION, MB_ICONINFORMATION, MB_ICONQUESTION, MB_ICONSTOP.     
bModelessTrue, if the dialog is to be shown as modeless and therefore allowing interaction with the main GSEOS application. The default is False, showing the dialog as modal. In either case, the MessageBox() function does not return until the dialog has completed.  
Returns
One of the following constants depending on the user action: IDCANCEL, IDNO, IDOK, IDRETRY, IDYES.

Example
Display a message box that prompts the user to confirm issuing a dangerous command:

import Gseos
Gseos.MessageBox('You are about to increase the HV level\n Do you want to continue?',
                 'Confirm hazardous command', Gseos.MB_YESNO, Gseos.MB_ICONEXCLAMATION)