Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disabling Events

Status
Not open for further replies.

markv105

Programmer
Aug 8, 2002
11
0
0
CA
Hi,

Does anyone know how to disable and enable windows events such as focuschanged or itemchanged?

thanks!
 
Hi,
ItemFocuschanged and ItemChanged events are assosiated
with datawindow control. These are not window events.

In order to disable these events you can use different
Return statements


(In ItemFocusChanged)
Return 0

(In ItemChanged)
0 (Default) Accept the data value
1 Reject the data value and don't allow focus to change
2 Reject the data value but allow the focus to change

 
Hi,

You may use boolean Instance vars to disable events. For instance, psuedo-code:

Process-start:
ib_DisableEvent = TRUE ;

Process-end:
ib_DisableEvent = FALSE ;

dw.ItemChanged!, ...
IF ib_DisableEvent THEN
RETURN ;
END IF ;

...


Regards,

--
PowerObject!
-----------------------------------------
PowerBuilder / PFC Developers' Group
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top