Activates the prev window in the child window chain. |----CLASS EXAMPLE----| |-Start: #Let's start. #We start the main class creation, in the constructor we do the #widget's showing, to give a particular pop-up #creation appearance. class (ws,widget) { constructor { $$->$setGeometry(%X,%Y,100,100) $$->%label=$new(label,$$) $$->%label->$settext("Another class by N\&G") $$->%label->$setautoresize(1) $$->$show() } } #We create the new workspace, and we set a 640x480 size with widget $resize #command. %Workspace=$new(workspace) %Workspace->$resize(640,480) #Now we make a cycling costruction of the widgets(look at the class), #and give to the widgets a random X and Y coordinates. #It takes few seconds to show the effects, be patient. %I=0 while (%I<100) { %X=$rand(500) %Y=$rand(480) %Widget=$new(ws,%Workspace) %I++ } #Let's show the fireworks! EnJoY! %Workspace->$show() |-Start: |-|EXAMPLE n2: #This is like the first example but it has a particular animation effect. %Hex[]=$array(0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F) class (ws,widget) { constructor { $$->$setGeometry(%X,%Y,100,100) $$->%lay=$new(layout,$$) %i=0 while (%i<10) { $$->%label=$new(label,$$) $$->%label->$settext("Another class by N\&G") %color=%Hex[$rand(15)]%Hex[$rand(15)]%Hex[$rand(15)]%Hex[$rand(15)]%Hex[$rand(15)]%Hex[$rand(15)] $$->%label->$setforegroundcolor(%color) $$->%label->$setautoresize(1) $$->%lay->$addwidget($$->%label,%i,0) %i++; } $$->$show() } mousepressevent { if ($istimer(cycle) == 1) killtimer cycle } } %Workspace=$new(workspace) %Workspace->$resize(640,480) %Workspace->$setCaption("Hit the mouse to stop cycling windows....") %I=0 %Cicle=1 while (%I<20) { %X=$rand(500) %Y=$rand(480) %Widget=$new(ws,%Workspace) %I++ } %Workspace->$show timer (cycle,3000) { if (%Cicle==1) %Workspace->$tile() if (%Cicle==2) { %Workspace->$cascade() %Cicle=1 return } %Cicle++ } privateimpl(%Workspace,mousepressevent) { if ($istimer(cycle) == 1) killtimer cycle } #-|End.
|