SuperStrict Local MyWindow:TGadget=CreateWindow("Button Example", 200,200,320,240) Local MyButton:TGadget=CreateButton("Click Me",140,60,80,40, MyWindow) Repeat WaitEvent() Until EventID()=EVENT_WINDOWCLOSE End |
SuperStrict |
Local MyButton:TGadget=CreateButton("Click Me",140,60,80,40, MyWindow) |
Function CreateButton:TGadget(label$,x,y,w,h,group:TGadget,style=BUTTON_PUSH) |
Repeat WaitEvent() Until EventID()=EVENT_WINDOWCLOSE End |
SuperStrict Local MyWindow:TGadget=CreateWindow("Button Example", 200,200,320,240) Local MyButton:TGadget=CreateButton("Click Me",140,60,80,40, MyWindow) Repeat WaitEvent() Select EventID() Case EVENT_WINDOWCLOSE End End Select Forever |
SuperStrict Local MyWindow:TGadget=CreateWindow("Button Example", 200,200,320,240) Local MyButton:TGadget=CreateButton("Click Me",140,60,80,40, MyWindow) Repeat WaitEvent() Select EventID() Case EVENT_WINDOWCLOSE End Case EVENT_GADGETACTION SetGadgetText(MyButton,"Button clicked") End Select Forever |
SuperStrict Local MyWindow:TGadget=CreateWindow("Button Example", 200,200,320,240) Local MyButton:TGadget=CreateButton("Click Me",140,60,80,40, MyWindow) Repeat WaitEvent() Select EventID() Case EVENT_WINDOWCLOSE End Case EVENT_GADGETACTION SetGadgetText(MyButton,"Button clicked") SetGadgetText(MyWindow,"Someone clicked my button") End Select Forever |
Local MyWindow:TGadget=CreateWindow("Button Example", 200,200,320,240) Local MyButton:TGadget=CreateButton("Click Me",140,60,80,40, MyWindow) |
Local GadgetName:TGadget= .... |
Local MyNumber:Int Local A:Float = 1.234 Local Text:String |
Local MyWindow=CreateWindow("Button Example", 200,200,320,240) |
Local MyWindow:TGadget=CreateWindow("Button Example", 200,200,320,240) |
SuperStrict Local MyWindow:TGadget=CreateWindow("Two Buttons Example", 200,200,320,240) Local Button1:TGadget=CreateButton("One",140,40,80,40, MyWindow) Local Button2:TGadget=CreateButton("Two",140,100,80,40, MyWindow) Repeat WaitEvent() Select EventID() Case EVENT_WINDOWCLOSE End Case EVENT_GADGETACTION Select EventSource() Case Button1 SetGadgetText(Button1,"One clicked") Case Button2 SetGadgetText(Button2,"Two clicked") End Select End Select Forever |