BackTabOut  ButtonClicking

Chapter 8: DataWindow Events

ButtonClicked

Description

Occurs when the user clicks a button inside a DataWindow object.

PocketBuilder event information Event ID: pbm_dwnbuttonclicked

Argument

Description

row

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

actionreturncode

Long by value. The value returned by the action performed by the button.

For information about return values, see the Action DataWindow object property.

dwo

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

Returns

There are no special outcomes for this event. The only code is:

Usage

The ButtonClicked event executes code after the action assigned to the button has occurred. This event is fired only if you have not selected Suppress Event Processing for the button. If Suppress Event Processing is on, only the Clicked event and the action assigned to the button are executed when the button is clicked.

If Suppress Event Processing is off, the Clicked event and the ButtonClicked event are fired. If the return code of the ButtonClicking event is 0, the action assigned to the button is executed and the ButtonClicked event is fired. If the return code of the ButtonClicking event is 1, neither the action nor the ButtonClicked event are executed.

Examples

Example 1

This statement in the ButtonClicked event displays the value returned by the button’s action:

MessageBox(" ", actionreturncode)

Example 2

This statement in the ButtonClicked event displays the value returned by the button’s action:

String	ls_Object
String				ls_Win

ls_Object = String(dwo.name)
If ls_Object = "cb_close" Then
	Close(Parent)
ElseIf ls_Object = "cb_help" Then
	ls_win = parent.ClassName()
	f_open_help(ls_win)
End If

See also





Copyright © 2004. Sybase Inc. All rights reserved. ButtonClicking

View this book as PDF