#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")
|
| x=PurePointXX(#Button) ;<-- Return Horizontal Position of PurePoint on Button
|
| SetGadgetText(#Text,"Null")
|
| SetGadgetText(#Text,"X="+Str(x)+" Y="+Str(y))
|
| Case #PB_Event_CloseWindow
|
EndIf
End
|