We've often been asked how to rectify this as simply setting the SELPOS property doesn't suffice, so here's the solution - we use the Windows API SendMessage function to clear the selection like so...
$insert logical
equ DTM_SELROW$ to 1083 ; * // ( WM_USER + 59 )
equ DTPOS_INVALID$ to -3
hwndEdt = get_Property( @window : ".TABLE_1", "HANDLE" )
call sendMessage( hwndEdt, DTM_SELROW$, FALSE$, DTPOS_INVALID$ )
equ DTM_SELROW$ to 1083 ; * // ( WM_USER + 59 )
equ DTPOS_INVALID$ to -3
hwndEdt = get_Property( @window : ".TABLE_1", "HANDLE" )
call sendMessage( hwndEdt, DTM_SELROW$, FALSE$, DTPOS_INVALID$ )
great...I've always wondered how to do this.
ReplyDelete