Navigation: Ultimate Suite for PowerBuilder Help > PowerToast >

Implementation

Send comments on this topic.

 

Regular Toast Message:

n_cst_powertoast lnv_toast

lnv_toast.of_Register(w_main2)
lnv_toast.of_SetToastDuration(3)
lnv_toast.of_RegisterCallback(lnv_toast.CLICK_CALLBACK, PARENT, "ue_toastclicked")
lnv_toast.of_Toast(sle_title.Text, sle_message.Text, sle_image.Text, lnv_toast.SLIDEUP_ANIMATION)

 

For Alerts:

n_cst_powertoast lnv_toast

lnv_toast.of_SetParentWindow(w_main2)
lnv_toast.of_SetToastDuration(5)
lnv_toast.of_Alert("success.png", "Success Alert", "Green", lnv_toast.FADE_ANIMATION)

To make things easier:

//Global Variable
n_cst_powertoast PowerToast

//Open Event of Frame Window
PowerToast.of_Register(THIS)
PowerToast.of_SetToastDuration(5)
PowerToast.of_SetAnimation(PowerToast.FADE_ANIMATION)

//In any location in your application
PowerToast.of_Alert("success.png","Your Success Message")
 


Copyright © 2021 Werysoft Inc.