I can't get the CreateToolBar(0, WindowID()) working. Is there
something special we have to do to get it working in OSX? Or does
it just not work in OSX yet?
Thanks,
-Garrett
[Resolved] CreateToolBar(0, WindowID())
-
- Enthusiast
- Posts: 346
- Joined: Wed Oct 26, 2005 2:46 am
- Contact:
[Resolved] CreateToolBar(0, WindowID())
Last edited by garretthylltun on Tue Jan 17, 2006 2:27 am, edited 2 times in total.
WindowID ???
Code: Select all
If CreateToolBar(0, WindowID(#Main_Window))
ToolBarImageButton(0, UseImage(TBico_1))
ToolBarImageButton(1, UseImage(TBico_2))
ToolBarImageButton(2, UseImage(TBico_3))
ToolBarSeparator()
ToolBarImageButton(3, UseImage(TBIco_4))
ToolBarToolTip(3, "Print")
ToolBarImageButton(4, UseImage(TBico_5))
ToolBarToolTip(4, "Find a document")
; Trying to Create and Toolbar Item that NOT have an Menu Item
ToolBarSeparator()
ToolBarImageButton(100,UseImage(TBico_6))
EndIf ; Create Toolbar
-
- Enthusiast
- Posts: 346
- Joined: Wed Oct 26, 2005 2:46 am
- Contact:
-
- Enthusiast
- Posts: 346
- Joined: Wed Oct 26, 2005 2:46 am
- Contact:
Ok, I am obviously missing something here and I can't find my problem.
Could someone take a looksie and see if they can find my mistake?
Toolbar just isn't showing up at all for me 
-Garrett
Could someone take a looksie and see if they can find my mistake?
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

-Garrett
-
- Enthusiast
- Posts: 346
- Joined: Wed Oct 26, 2005 2:46 am
- Contact: