home *** CD-ROM | disk | FTP | other *** search
- {-- frame4.pas}
- {$F+}
-
- USES teglunit,teglmain;
-
- VAR ifs : ImageStkPtr;
-
- function cancelevent(frame: ImageStkPtr; mouse: MsClickPtr): Word;
- BEGIN
- {-- this will press the button down and if the mouse button }
- {-- is release WHILE it is over the button it will return }
- {-- TRUE. If the mouse cursor passes out of the button without }
- {-- being released then it will return FALSE and }
- {-- releasesquarebutton will be called automatically. }
- if visualsquarebuttonpress(frame,mouse) then
- begin
- {-- was TRUE, we release the button }
- releasesquarebutton(frame,mouse);
- {-- then dispose of the frame. }
- dropstackimage(ifs);
- end;
- END;
-
- BEGIN
- easytegl;
- easyout;
- PushImage(50,50,200,150);
- ShadowBox(50,50,200,150);
- ifs := StackPtr;
- DefineSquareButtonText(ifs,0,0,70,30,5,5,'CANCEL',cancelevent);
- TeglSupervisor;
- END.
-
-
-