
SET  &::WM_LBUTTONDOWN=0x0201
SET  &::WM_LBUTTONDBLCLK=0x0203
SET  &::WM_RBUTTONDOWN=0x0204


ENVI$ TAB=09
ENVI$ NLC=0a
ENVI$ NL=0d 0a

ENVI &&TITLE=+110:Row%TAB%=60:Col1%TAB%:70:Col 2%TAB%+80:Col 3
ENVI &&TDAT=AA,,,A%TAB%111%TAB%22222%TAB%222222%NLC%BBB%TAB%111%TAB%22222%TAB%22222%NLC%BBB%TAB%111%TAB%22222%TAB%22222%NLC%BBB%TAB%111%TAB%22222%TAB%22222 

CALL WIN1
_SUB WIN1,W489H449,多单元格着色，左键选择，双击去选择，右键去选择,按住CTRL键为行,
    TABL -color:0x00F000#0x808000#0xF0E0FF#0x80 TABL1,L43T10W368H315,%&TITLE%,%&TDAT%, 0x180940  //自由着色 
    ENVI @TABL1.MSG=_%&WM_LBUTTONDOWN%:      CALL  OnLButton
    ENVI @TABL1.MSG=_%&WM_LBUTTONDBLCLK%:      CALL  OnRemove
    ENVI @TABL1.MSG=_%&WM_RBUTTONDOWN%:      CALL  OnRemove
_END

_SUB OnLButton
    ENVI  @TABL1.Sel=?.&&Row;&&Col
    FIND KEY=17, ENVI &&C=1! ENVI &&C=0
    FIND $0=%&C%, ENVI  @TABL1.Color=%&Row%.%&Col%;;0xFF
    FIND $1=%&C%, ENVI  @TABL1.Color=*%&Row%;;0xFFFF00
_END

_SUB OnRemove
    ENVI  @TABL1.Sel=?.&&Row;&&Col
    FIND KEY=17, ENVI &&C=1! ENVI &&C=0
    FIND $0=%&C%, ENVI  @TABL1.Color=%&Row%.%&Col%;;-1
    FIND $1=%&C%, ENVI  @TABL1.Color=*%&Row%;;-1
_END