> Hi friends: I need to select a group of records that are shown inside
> a browse...how can I active the key shift+arrow down in order to get
> those records in one step....thanks in advance
// Make an array visible to the whole file
STATIC aTagList := {}
////////////////////////////////////////////
// Add/Delete items from an array when pressing the spacebar in the
TBrowse
CASE nKey = K_SPACE
nRecNo := ( cAlias )->( RECNO() )
nPos := ASCAN( aTagList, {|x| x = nRecNo }
IF nPos = 0
// Not there so add it to the list
AADD( aTagList, nRecNo )
// Sort aTaglist if you want
ELSE
// Already there so remove this record from the list
ADEL( aTagList, nPos )
ASIZE( aTagList, Len( aTagList ) - 1 )
ENDIF
////////////////////////////////////////////
// To change the colours in the the TBrowse to show selected items
// Use the oTB:ColorSpec to add whatever colours you want
oTB:ColorBlock := {|| IIF( ColourEm( cAlias ), { 3, 4 }, { 1, 2 } ) }
////////////////////////////////////////////
STATIC FUNCTION ColourEm( cAlias )
LOCAL nPos
LOCAL nRecNo
// Get the current record no
nRecNo := ( cAlias )->( RECNO() )
// See if it's in the list
nPos := ASCAN( aTagList, {|x| x = nRecNo } )
RETURN nPos > 0
--
CYA
Steve


|