Navigation: Ultimate Suite for PowerBuilder Help > PowerMessage > Functions >

of_setbuttontext

Send comments on this topic.

 

Description:

 

Overrides the default text for the message box buttons. If you need custom text in the message buttons, you must call this method before each MessageBox function call. Values stored with this method call will be erased once the MessageBox function is finished executing.

Syntax:

of_setbuttontext (string as_button1)
of_setbuttontext (string as_button1, string as_button2)
of_setbuttontext (string as_button1, string as_button2, string as_button3)

Argument

Description

as_button1

Text that will display in the first button.

as_button2

Text that will display in the second button.

as_button3

Text that will display in the third button.

Return Value:

Always returns 1.

Usage:

Example 1; Custom Text:

//Set the text that will display for the first and second button

PowerMessage.of_SetButtonText("Restart", "Later")
 

//Use the YesNo! enumerator to display two buttons

PowerMessage.MessageBox("Application Restart Required", "The application needs to restart to apply changes.", YesNo!, 1)

 

 

Example 2; Localized Text:

 

//Set the text that will display for the first and second button

PowerMessage.of_SetButtonText("Oui", "Non", "Annuler")
 

//Use the YesNoCancel! enumerator to display three buttons

PowerMessage.MessageBox("Redémarrage de l'application requis", "L'application doit redémarrer pour appliquer les modifications.", YesNoCancel!, 1)


Copyright © 2021 Werysoft Inc.