edittable & DEL (OpenInsight 32-Bit)
At 28 APR 2008 08:09:47AM Martin Drenovac wrote:
In light of the current version of the edittable, I am trying to create an association between two edittables, so that the 2nd is just a display container for information that ideally wants to be lines 2 & 3 of each row of the 1st edittable.
An INS is "catchable" via the POSCHANGED event, and programming magic to work out what's gone wrong.
I know that the DEL has happened before anything is raised - is anything raised when a DEL actually happens in the edittable and/or is there a magic WINMSG that I can listed to so that I can programatically manage the association.
CHeers
At 28 APR 2008 09:46AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:
Martin,
There is indeed a WINMSG call you can use to trap a keyboard DELETE keypress, which eventually raises the DELETEROW event on the edit table (I'm assuming from your request that the standard INSERTROW and DELETEROW events won't cut it?)
Anyway, the edit table control sends a couple of notification messages to it's parent that when it detects the keyboard InsertRow and DeleteRow operations. You can intercept these with a synchronous WINMSG event and if you want actually stop them happening.
First you need to tell OI to track the message you want, e.g:
pre.code {
background-color: #E5E5E5;border: 1px solid #000000;width: 800px;padding: 5px;font-family: courier, verdana, arial, serif;margin: 0px 10px auto;}
$insert logical equ WM_USER$ to 1024 equ ETM_INSERTROW$ to (WM_USER$ + 2004) equ ETM_DELETEROW$ to (WM_USER$ + 2005) eventOp =TRUE$ ; * // Turn tracking on eventOp<4>=TRUE$ ; * // Track Synchronously call send_Message( @window : ".TABLE_1", | "QUALIFY_EVENT", | ETM_DELETEROW$, | eventOp )Then in the edit table's WINMSG event do:
$insert logical equ WM_USER$ to 1024 equ ETM_INSERTROW$ to (WM_USER$ + 2004) equ ETM_DELETEROW$ to (WM_USER$ + 2005) begin case case ( message=ETM_DELETEROW$ ) * // Stop the delete here... call set_WinMsgVal( TRUE$, 0 ) ; * // Force PS to return 0 ; * // to Windows end caseWorld leaders in all things RevSoft
At 28 APR 2008 10:04AM Martin Drenovac wrote:
Guys Thank you very much.
I've actually not even tried INSERTROW and DELETEROW , but will get into the HELP.hlp to check. I will visit the Promoted Event logic to see.
Thanks again -