Code: Alles auswählen
*hWin.long = OpenWindow(#PB_Any,#PB_Ignore,#PB_Ignore,640,480,"",#WS_SYSMENU|#WS_SIZEBOX)
CreateGadgetList(*hWin\l)
ButtonGadget(0,10,10,100,100,"Blub1")
ButtonGadget(1,10,110,100,100,"Blub2")
CreateStatusBar(0,*hWin\l)
AddStatusBarField(90)
Repeat
uMsg = WaitWindowEvent()
If #WM_MOUSEMOVE = uMsg
x = DesktopMouseX()
y = DesktopMouseY()
Select WindowFromPoint_(x,y)
Case GadgetID(0)
StatusBarText(0, 0, "Blub1")
Case GadgetID(1)
StatusBarText(0, 0, "Blub2")
Default
StatusBarText(0, 0, Str(x) + ":" + Str(y))
EndSelect
EndIf
Until uMsg = #WM_CLOSE
