This is to fix the shift & left-click to select multiple records under SQLRDD
- Code: Select all Expand view
case nOperation == 3 // Shift & lclick
cEndIndexKey := &( ( ::cAlias )->(IndexKey()) )
uBook := Eval( ::bBookMark )
if ( ::cAlias )->( RddName() ) == "SQLRDD"
uCurRow := ( ::cAlias )->(RecNo())
else
uCurRow := ::KeyNo()
endif
Eval( ::bBookMark, Atail( ::aSelected ) )
if ( ::cAlias )->( RddName() ) == "SQLRDD"
uOldRow := ( ::cAlias )->(RecNo())
else
uOldRow := ::KeyNo()
endif
cStIndexKey := &( ( ::cAlias )->(IndexKey()) )
if uOldRow != uCurRow
::aSelected := { Atail( ::aSelected ) }
if IF( ( ::cAlias )->( RddName() ) == "SQLRDD", cEndIndexKey > cStIndexKey, uCurRow > uOldRow)
CursorWait()
do while ( uTemp := Eval( ::bBookMark ) ) != uBook .and. ! ::Eof()
If Ascan( ::aSelected, uTemp ) == 0
Aadd( ::aSelected, uTemp )
Endif
::Skip( 1 ) // Eval( ::bSkip, 1 )
enddo
CursorArrow()
else
CursorWait()
do while ( uTemp := Eval( ::bBookMark ) ) != uBook .and. ! ::Bof()
If Ascan( ::aSelected, uTemp ) == 0
Aadd( ::aSelected, uTemp )
endif
::Skip( -1 ) // Eval( ::bSkip, -1 )
enddo
CursorArrow()
endif
Aadd( ::aSelected, uBook )
Eval( ::bBookMark, uBook )
// ::lRefreshOnlyData := .t.
::GetDC()
::Paint()
::ReleaseDC()
else
Eval( ::bBookMark, uBook )
endif
Will this code be considered for future versions of FW or will I need to make these changes each time?
I have bound the code with SQLRDD conditions, so hopefully it wont effect 95% of other users. If this code is to be considered, can someone review my other post I made last week :
viewtopic.php?f=3&t=22589
If someone would like me to email my complete xbrowse.prg, then let me know.
Regards,
Pete