Page 1 of 1

ToolBar does not seem to work on Mac

Posted: Wed Dec 20, 2017 8:09 pm
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

Re: ToolBar does not seem to work on Mac

Posted: Wed Dec 20, 2017 8:25 pm
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

Re: ToolBar does not seem to work on Mac

Posted: Wed Dec 20, 2017 8:42 pm
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

Re: ToolBar does not seem to work on Mac

Posted: Wed Dec 20, 2017 8:46 pm
by mk-soft
Only by help for "ToolBarStandardButton()" :mrgreen:
Supported OS
- Windows, Linux
P.S.
I've fallen for it, too.

Re: ToolBar does not seem to work on Mac

Posted: Wed Dec 20, 2017 10:59 pm
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?