[PB 5.00 b2 x64] different behavior of Toolbar & Coordinates

Just starting out? Need help? Post your questions and find answers here.
walker
Enthusiast
Enthusiast
Posts: 634
Joined: Wed May 05, 2004 4:04 pm
Location: Germany

[PB 5.00 b2 x64] different behavior of Toolbar & Coordinates

Post by walker »

Hope the Title is not too confusing..

When Creating a window with a Menu, the point 0,0 (left upper corner) where you can place a gadget etc. is at the bottom of the menu. Nothing is overlapping or hidden. When creating a Toolbar too, the fist accessible point (x=0,y=0) for a Gadget is

- on Linux right below the Toolbar (which is correct in my opinion)
- on windows right below the Menu (!)

A Gadget on windows with x=0 and y=0 would be hidden by the Toolbar ... the height of the Toolbar is not respected like on Linux.

Don't know what happens on OS X

Code for testing:

Code: Select all

windowhandle = OpenWindow(#PB_Any, 220, 0, 800, 600, "New window ( 0 )",  #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget | #PB_Window_TitleBar )
If windowhandle
    If CreateImageMenu(0, WindowID(windowhandle),#PB_Menu_ModernLook)
        MenuTitle("Datei")
        MenuItem(0, "neu")
        MenuItem(1, "öffnen")
        MenuItem(2, "schliessen")
        MenuBar()
        MenuItem(3, "Programm verlassen")
    EndIf
    
    If CreateToolBar(0,WindowID(windowhandle))
        ToolBarStandardButton(0,#PB_ToolBarIcon_New)            
    EndIf
    TextGadget(0,0,0,200,20,"This text is hidden on windows")
EndIf

Repeat
    
Until WaitWindowEvent()=#PB_Event_CloseWindow
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: [PB 5.00 b2 x64] different behavior of Toolbar & Coordin

Post by Polo »

This is not a bug, it's due to OSes not behaving the same way, PB provides helping functions to make crossplatform applications (ie ToolBarHeight()).
Post Reply