LOGS *x3.log
SET  &::WM_MOUSEENTER=0x1000
SET  &::WM_MOUSEHOVER=0x02A1
SET  &::WM_MOUSELEAVE=0x02A3
SET  &::WM_LBUTTONDOWN=0x0201
SET  &::WM_LBUTTONUP=0x0202
SET  &::WM_LBUTTONDBLCLK=0x0203
SET  &::WM_LBUTTONDOWN_POST=0x1001
SET  &::WM_LBUTTONDBLCLK_POST=0x1002

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

//ENVI &&TITLE=#0xFF0000#0x40+110:Row%TAB%#0xFF00#0x400000=60:Col1%TAB%#0xFF:70:Col 2%TAB%#0x800000+80:Col 3
ENVI &&TITLE=#0xFF0000#0x40+110:Row%TAB%#0xFF00#0x400000=60:Col1%TAB%#0xFF:70:Col 2%TAB%+80:Col 3
ENVI &&TDAT=AAA%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  //2行

ENVI &&I=0
CALL WIN1
_SUB WIN1,W800H543,PECMD%PECMDVER%表格演示,
    //   TABL -font:20:幼圆 -color:0xF00000#0x808000#0xF0E0FF#0xFF TABL1,L18T17W330H119,%&TITLE%,%&TDAT%, 0xDC0  ///=USERCTRL
    TABL -font:30:幼圆:1.0:0x800000:-0.8 -color:0x00F000#0x808000#0xF0E0FF#0x80 TABL1,L20T19W330H119,%&TITLE%,%&TDAT%, 0x180D40  //USERCTRL
    TABL -color:0x00F000#0x808000#0xF0E0FF TABL2,L19T187W333H128,%&TITLE%,%&TDAT%, 0x940  //USERCTRL
    TABL -font:12:幼圆:1.5:0x800000:-0.8 -color:0x00F000#0x808000#0xF0E0FF#0x80  TABL3,L420T19W330H119,%&TITLE%,%&TDAT%, 0x180940  //自由着色
    TABL -color:0x00F000#0x808000#0xF0E0FF#0x80 TABL4,L419T187W333H128,%&TITLE%,%&TDAT%, 0x10940  //USERCTRL
    //   TABL   TABL1,L20T19W330H119,%&TITLE%,%&TDAT%, 0x20240   ///0xDC0  //=USERCTRL
    //   TABL   TABL1,L20T19W330H119,%&TITLE%,%&TDAT%, 0x20240   ///0xD40  //=USERCTRL
    //    TABL TABL1,L20T19W330H119,%&TITLE%,%&TDAT%, 0x1C0  
    LABE+ LABE1,L9T351W356H30,,,
    
    ENVI @TABL1.MSG=%&WM_MOUSEENTER%: ENVI @LABE1=欢迎进入表格TABL1
    ENVI @TABL1.MSG=0x02A1: ENVI @LABE1=欢迎惠顾表格TABL1
    ENVI @TABL1.MSG=0x02A3: ENVI @LABE1=欢迎再来表格TABL1
    ENVI @TABL1.MSG=_%&WM_LBUTTONDOWN%:      CALL  OnLButton
    ENVI @TABL1.MSG=_%&WM_LBUTTONDBLCLK%:  CALL  OnLButton
    
    ENVI @TABL2.MSG=%&WM_MOUSEENTER%: ENVI @LABE1=欢迎进入表格TABL2
    ENVI @TABL2.MSG=0x02A1: ENVI @LABE1=欢迎惠顾表格TABL2
    ENVI @TABL2.MSG=0x02A3: ENVI @LABE1=欢迎再来表格TABL2
    ENVI @TABL2.MSG=_%&WM_LBUTTONDOWN%:      CALL  OnLButton2

    ENVI @TABL3.MSG=_%&WM_LBUTTONDOWN%:      CALL  OnLButton3

    ITEM ITEM2,L294T142W60H30,ITEM2, CALL  OnLButton2,
    ENVI @ITEM2.MSG=%&WM_MOUSEENTER%: ENVI @LABE1=欢迎进入ITEM2
    ENVI @ITEM2.MSG=0x02A1: ENVI @LABE1=欢迎惠顾ITEM2
    ENVI @ITEM2.MSG=0x02A3: ENVI @LABE1=欢迎再来ITEM2
    ITEM ITEM3,L231T143W60H30,ITEM3,  CALL OnLButton,
    ITEM ITEM4,L21T145W60H30,修改1.2, CALL OnB4,
    MEMO MEMO2,L11T389W358H104,,,
    LABE LABEL1,L504T141W171H20,表格3 多行无钩勾选,,
    LABE LABEL2,L84T142W136H16,表格1 多行勾选,,
    LABE LABEL3,L37T318W180H19,表格2 多行选择（无着色）,,
    ITEM ITEM21,L225T316W60H26,ITEM21,CALL OnLButton2,
    LABE LABEL4,L472T316W240H27,表格4 单行选择,,
_END

_SUB OnB4
        //    TEAM ENVI  @TABL1.Color=1;0xFFFF
    TEAM ENVI  @TABL1.Color=1.2;0x800080
    //TEAM ENVI  @TABL1.Color=*1;0xFFFF
    TEAM ENVI  @TABL1.Color=1.2;0x800080
    TEAM ENVI  @TABL1.Color=?1.2;Col12
    ENVI @LABE1=Col12=[%Col12%]
    ENVI @TABL1.Check=?1;Check1
    ENVI @TABL1.Check=?2;Check2
    MESS  Check1=[%Check1%]  Check2=[%Check2%]
    TEAM ENVI  @TABL1.Val=1.2;NEW %&I%| CALC #&I=%&I% + 1
    ENVI @TABL1.Val=?*.*;&&DATA
    MESS [%&DATA%]@#OK
    ENVI  @TABL1.Color=1;0x0000FF;0x400000
    TEAM ENVI  @TABL1.Color=1.2;0xFF00FF;0x40
    ENVI  @TABL1.Sel=+1;2
_END

_SUB  OnLButton  
    ENVI  @TABL1.Sel=?&&Sel
    ENVI  @TABL1.Sel=?*&&Sels
    ENVI  @TABL1.Sel=?+&&SelL;&&SelCol
    ENVI  @TABL1.Val=?%&Sel%;&&VAL
    ENVI  @TABL1.Val=?*;&&LINES;&&COLS
    ENVI @TABL1.Check=?1;Check1
    ENVI @TABL1.Check=?2;Check2
    ENVI  @MEMO2=Check1=[%Check1%]  Check2=[%Check2%] %NL% [*%&Sels%] %&Sel%  [%&VAL%]  [%&SelL%]+[%&SelCol%]
_END

_SUB  OnLButton2    
    ENVI  @TABL2.Sel=?&&Sel
    ENVI  @TABL2.Sel=?*&&Sels
    ENVI  @TABL2.Sel=?+&&SelL;&&SelCol
    ENVI  @TABL2.Val=?%&Sel%;&&VAL
    ENVI  @TABL2.Val=?*;&&LINES;&&COLS
    ENVI  @TABL2.Check=?1;Check1
    ENVI  @TABL2.Check=?2;Check2
    ENVI  @MEMO2=[*%&Sels%] %&Sel%  [%&VAL%]  [%&SelL%]+[%&SelCol%] %NL%2Check1=[%Check1%]  2Check2=[%Check2%]
_END


_SUB  OnLButton3    
    ENVI  @TABL3.Sel=?.&&Cur
    ENVI  @TABL3.Check=%&Cur%;2
    //ENVI  @TABL3.Sel=%&Cur%;2
_END
