ButtonClicked  Clicked

Chapter 8: DataWindow Events

ButtonClicking

Description

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

PocketBuilder 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.

Returns

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

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.

Examples

Example 1

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

MessageBox(" ", "Are you sure you want to proceed?")

See also





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

View this book as PDF