common.pb:
Code: Alles auswählen
Enumeration
#Window_0
EndEnumeration
Enumeration
#Button_0
#String_0
EndEnumeration
Global FontID1
FontID1 = LoadFont(1, "@MingLiU", 10,#PB_Font_HighQuality)
Procedure Open_Window_0()
If OpenWindow(#Window_0, 216, 0, 600, 300, #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar , "New window ( 0 )")
If CreateGadgetList(WindowID(#Window_0))
ButtonGadget(#Button_0, 80, 60, 60, 30, "す")
SetGadgetFont(#Button_0, FontID1)
StringGadget(#String_0, 310, 60, 190, 40, "す")
SetGadgetFont(#String_0, FontID1)
EndIf
EndIf
EndProcedure
Code: Alles auswählen
IncludeFile "Common.pb"
Open_Window_0()
Repeat
Event = WaitWindowEvent()
WindowID = EventWindow()
GadgetID = EventGadget()
EventType = EventType()
If Event = #PB_Event_Gadget
If GadgetID = #Button_0
ElseIf GadgetID = #String_0
EndIf
EndIf
Until Event = #PB_Event_CloseWindow
End