PurePointYY (Gadget.l)
Previous  Top  Next

Returns Vertical Position of PurePoint in specified Gadget.

Use:
Y=PurePointYY(Gadget)



Example:

#Main=0
#Text=1
#Button=3

If OpenWindow(#Main,0,0,400,300,#PB_Window_SystemMenu|#PB_Window_ScreenCentered,"Demo")
 
TextGadget(#Text,10,10,200,20,"")  
ButtonGadget(#Button,10,50,80,20,"Demo")  
 

hPoint=PurePoint("PP.pvp")  

quitMain=0  
Repeat  
UsePurePoint(hPoint)  

x=PurePointXX(#Button)  
y=PurePointYY(#Button) ;<-- Return Vertical Position of PurePoint on Button  

If x<0 Or y<0  
SetGadgetText(#Text,"Null")  
Else  
SetGadgetText(#Text,"X="+Str(x)+" Y="+Str(y))  
EndIf  

Select WaitWindowEvent()  
Case #PB_Event_CloseWindow  
quitMain=1  
EndSelect  
Until quitMain  

FreePurePoint(hPoint)  
EndIf
End