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

ButtonClicking – PB Docs 126 – PowerBuilder Library

ButtonClicking – PB Docs 126

ButtonClicking event

Description

Occurs when the user clicks a button. This event occurs before
the ButtonClicked event.

PowerBuilder event information

Event ID: pbm_dwnbuttonclicking

Argument

Description

row

Long by value. The number of the row
the user clicked.

dwo

DWObject by value. A reference to the
control within the DataWindow under the pointer when the user clicked.

Web DataWindow client control event information

Event name: ButtonClicking

Argument

Description

row

Number. The number of the row the user
clicked.

objectName

String. The name of the control within
the DataWindow under the pointer when the user clicked.

Web ActiveX event information

Event name: beforeButtonClick

Argument

Description

Row

Number. The number of the row the user
clicked.

Name

String. The name of the control within
the DataWindow under the pointer when the user clicked.

Return Values

Set the return code to affect the outcome of the event:

  • 0 Execute the action
    assigned to the button, then trigger the ButtonClicked event

  • 1 Prevent the action assigned to button
    from executing and the ButtonClicked event from firing

For information on setting the return code in a particular
environment, see “About return values for
DataWindow events”
.

Usage

Use the ButtonClicking event to execute code before the action
assigned to the button occurs. If the return code is 0, the action
assigned to the button is then executed and the ButtonClicked event
is fired. If the return code is 1, the action and the ButtonClicked
event are inhibited.

This event is fired only if you have not selected Suppress
Event Processing for the button.

The Clicked event is fired before the ButtonClicking event.

note.png Do not use a message box in the Clicked event

If you call the MessageBox function in
the Clicked event, the action assigned to the button is executed,
but the ButtonClicking and ButtonClicked events are not executed.

note.png Returning the row number

When you place a button in the DataWindow and use the window’s ButtonClicking
event to return the row number, you will get different results depending
on where you place the button. If the button is in the Detail band,
it returns the number of the row. If the button is in the Header
band, it returns the number of the first row displayed in the DataWindow
control. If the button is in the Summary band, it returns the number
of the final row in the list. If the button is in the Footer band,
it returns the number of the last row displayed in the DataWindow
control.

Examples

This statement in the ButtonClicking event displays
a message box before proceeding with the action assigned to the
button:

See Also


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