Ok, I am obviously missing something here and I can't find my problem.
Code: Select all
OpenWindow (0, 100, 100, 400, 300, #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget | #PB_Window_ScreenCentered , "Test Window")
UsePNGImageDecoder()
LoadImage(0, "/Users/garrett/Documents/Development/PureBasicProjects/TestProgram/new16.png")
;LoadImage(1, "/Users/garrett/Documents/Development/PureBasicProjects/TestProgram/open16.png")
;LoadImage(2, "/Users/garrett/Documents/Development/PureBasicProjects/TestProgram/save16.png")
;LoadImage(3, "/Users/garrett/Documents/Development/PureBasicProjects/TestProgram/saveas16.png")
;LoadImage(4, "/Users/garrett/Documents/Development/PureBasicProjects/TestProgram/cut16.png")
;LoadImage(5, "/Users/garrett/Documents/Development/PureBasicProjects/TestProgram/copy16.png")
;LoadImage(6, "/Users/garrett/Documents/Development/PureBasicProjects/TestProgram/paste16.png")
;LoadImage(7, "/Users/garrett/Documents/Development/PureBasicProjects/TestProgram/undo16.png")
;LoadImage(8, "/Users/garrett/Documents/Development/PureBasicProjects/TestProgram/hlp16.png")
;LoadImage(9, "/Users/garrett/Documents/Development/PureBasicProjects/TestProgram/close16.png")
CreateToolBar(0, WindowID())
ToolBarStandardButton(0, UseImage(0))
ToolBarStandardButton(1, #PB_ToolBarIcon_Open)
CreateGadgetList(WindowID())
;ButtonImageGadget(9, 320, 5, 29, 30, UseImage(9))
;ButtonImageGadget(8, 285, 5, 29, 30, UseImage(8))
;ButtonImageGadget(7, 250, 5, 29, 30, UseImage(7))
;ButtonImageGadget(6, 215, 5, 29, 30, UseImage(6))
;ButtonImageGadget(5, 180, 5, 29, 30, UseImage(5))
;ButtonImageGadget(4, 145, 5, 29, 30, UseImage(4))
;ButtonImageGadget(3, 110, 5, 29, 30, UseImage(3))
;ButtonImageGadget(2, 75, 5, 29, 30, UseImage(2))
;ButtonImageGadget(1, 40, 5, 29, 30, UseImage(1))
;ButtonImageGadget(0, 5, 5, 29, 30, UseImage(0))
EditorGadget(3, 5, 40, 390, 255)
EventID = WaitWindowEvent()
Event_Loop:
EventID = WaitWindowEvent()
If EventID = #PB_Event_CloseWindow ; If the user has pressed on the close button
End
EndIf
GadgetID = EventGadgetID()
If GadgetID = 9
Goto Gadget_Branch_9
EndIf
Goto Event_Loop
Gadget_Branch_9:
End