|
平行窗口与其它窗口的控件通信.WCS
- //==平行窗口与其它窗口的控件通信==//
- ENVI^ ENVIMODE=1
- ENVI^ ForceLocal=1
- WIN1
- _SUB WIN1,T10W272H270,新窗口1,KILL *%&__PID%,
- SET-def wid1=%&__WinID%
- SET-def wid2=0
- SET-def wid3=0
- SET-def dat1=
- ENVI$ NL=0d 0a
- ENVI @this.Visable=1
- LIST LIST1,L49T95W174H100,A|B|C,,A,
- ENVI @this.MSG=#1: ENVI @LIST1.ADDSEL=%dat1%
- ITEM ITEM8,L88T36W60H30,开窗口, TEAM ENVI @ITEM8.Enable=0| CALL @-平行窗口| CALL 子窗口,
- _END
- _SUB OpP
- SET dat1=X平行 %*
- ENVI @@SENDMSG=%wid2%:#1;1
- _END
- _SUB OpParentW
- SET dat1=X父 %*
- ENVI @@SENDMSG=%wid1%:#1;1
- _END
- _SUB OpSubW
- SET dat1=X子 %*
- ENVI @@SENDMSG=%wid3%:#1;1
- _END
- _SUB OnClose平行窗口
- SET wid2=0
- EXEC $使用说明.TXT
- _END
- _SUB 平行窗口,L2W360H340,平行窗口,CALL OnClose平行窗口,#1,20
- SET wid2=%&__WinID%
- LIST LIST1,L49T196W260H100,A|B|C,,A,
- ITEM ITEM6,L104T58W123H30,操作平行窗口, CALL OpP from 平行窗口, //自己,
- ITEM ITEM7,L96T105W110H30,操作父窗口,CALL OpParentW from 平行窗口,
- ITEM ITEM8,L89T151W109H30,操作子窗口,CALL OpSubW from 平行窗口,
- ENVI @this.MSG=#1: ENVI @LIST1.ADDSEL=%dat1%
- _END
- _SUB OnClose子窗口
- SET wid3=0
- EXEC $使用说明.TXT
- _END
- _SUB 子窗口,L370T300W360H340,子窗口,CALL OnClose子窗口,#1,20
- SET wid3=%&__WinID%
- LIST LIST1,L42T201W260H100,LIST1|LIST4,,LIST4,
- ITEM ITEM6,L66T43W123H30,操作平行窗口, CALL OpP from 子窗口,
- ITEM ITEM7,L70T94W110H30,操作父窗口,CALL OpParentW from 子窗口,
- ITEM ITEM8,L72T148W109H30,操作子窗口,CALL OpSubW from 子窗口, //自己,
- ENVI @this.MSG=#1: ENVI @LIST1.ADDSEL=%dat1%
- ENVI @this.Visable=1
- _END
复制代码
|
|