Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

CloseQuery – PB Docs 2019 – PowerBuilder Library

CloseQuery – PB Docs 2019

CloseQuery

PowerScript event

Description

Occurs when a window is closed, before the Close event.

Event ID

Event ID

Objects

pbm_closequery

Window

Arguments

None

Return Values

Long.

Return code choices (specify in a RETURN statement):

0 — Allow the window to be closed

1 — Prevent the window from closing

Usage

If the CloseQuery event returns a value of 1, the closing of the
window is aborted and the Close event that usually follows CloseQuery does
not occur.

If the user closes the window with the Close box (instead of using
buttons whose scripts can evaluate the state of the data in the window),
the CloseQuery event still occurs, allowing you to prompt the user about
saving changes or to check whether data the user entered is valid.

Obsolete techniques

You no longer need to set the ReturnValue property of the Message
object. Use a RETURN statement instead.

Examples

This statement in the CloseQuery event for a window asks if the user
really wants to close the window and if the user answers no, prevents it
from closing:

This script for the CloseQuery event tests to see if the DataWindow
dw_1 has any pending changes. If it has, it asks the user whether to
update the data and close the window, close the window without updating,
or leave the window open without updating:

See also

Close


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x