ToolBar does not seem to work on Mac

Just starting out? Need help? Post your questions and find answers here.
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

ToolBar does not seem to work on Mac

Post by davido »

When I ran the code below the ToolBar was completely blank.
Can anyone confirm that this is a bug or just a combination of PureBasic 5.61 x64 running on my system?

Code: Select all

If OpenWindow(0, 0, 0, 150, 25, "ToolBar", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    If CreateToolBar(0, WindowID(0))
      ToolBarStandardButton(0, #PB_ToolBarIcon_New)
      ToolBarStandardButton(1, #PB_ToolBarIcon_Open)
      ToolBarStandardButton(2, #PB_ToolBarIcon_Save)
    EndIf
    Repeat
      Event = WaitWindowEvent()
      If Event = #PB_Event_Menu
        Debug "ToolBar ID: "+Str(EventMenu())
      EndIf
    Until Event = #PB_Event_CloseWindow 
  EndIf
My Mac wrote: Model Name: MacBook Pro
Model Identifier: MacBookPro12,1
Processor Name: Intel Core i7
Processor Speed: 3.1 GHz
Number of Processors: 1
Total Number of Cores: 2
L2 Cache (per Core): 256 KB
L3 Cache: 4 MB
Memory: 8 GB

System Version: OS X 10.10.5 (14F2511)
Kernel Version: Darwin 14.5.0
Boot Volume: Macintosh HD
Boot Mode: Normal
DE AA EB
User avatar
mk-soft
Always Here
Always Here
Posts: 6244
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: ToolBar does not seem to work on Mac

Post by mk-soft »

ToolBarStandardButton only for Windows and Linux. See PB-Help!

Alternate Module: http://www.purebasic.fr/english/viewtop ... 12&t=67622

or

ToolBarExModule: http://www.purebasic.fr/english/viewtop ... 12&t=69707
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

Re: ToolBar does not seem to work on Mac

Post by davido »

@mk-soft
Thank you for your help and the interesting links. :D

I did check the manual and it mentioned All OS.
I also checked again and cannot find a reference alluding to it being limited to Windows and Linux. None-the-less I accept you are correct.
Manual PureBasic 5.61 wrote:
If OpenWindow(0, 0, 0, 150, 25, "ToolBar", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
If CreateToolBar(0, WindowID(0))
ToolBarStandardButton(0, #PB_ToolBarIcon_New)
ToolBarStandardButton(1, #PB_ToolBarIcon_Open)
ToolBarStandardButton(2, #PB_ToolBarIcon_Save)
EndIf
Repeat
Event = WaitWindowEvent()
If Event = #PB_Event_Menu
Debug "ToolBar ID: "+Str(EventMenu())
EndIf
Until Event = #PB_Event_CloseWindow
EndIf



See Also

ToolBarStandardButton(), ToolBarImageButton(), ToolBarSeparator(), FreeToolBar()
Supported OS

All
DE AA EB
User avatar
mk-soft
Always Here
Always Here
Posts: 6244
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: ToolBar does not seem to work on Mac

Post by mk-soft »

Only by help for "ToolBarStandardButton()" :mrgreen:
Supported OS
- Windows, Linux
P.S.
I've fallen for it, too.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

Re: ToolBar does not seem to work on Mac

Post by davido »

@mk-soft,
'The pennies dropped'! - Got it, now. :oops:
Thank you for your patience.
Perhaps if a Documentation Editor sees this, might have pity on me and make this plainer in the Manual?
DE AA EB
Post Reply