EditTable Cookbook - Clearing single row selection
Published 11 JUN 2010 at 11:48:00AM by Captain C
One of the more annoying visual traits we find with the EditTable is with single row selection: There seems to be no way to unselect a row and remove the highlight once it's there, and this can lead to a confusing state when it appears that more than one control has the focus.
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$ )
Comments
Comment by Anonymous on 21 NOV 2019 at 02:27:21AM:
great...I've always wondered how to do this.