[PB 5.00 b2 x64] different behavior of Toolbar & Coordinates
Posted: Fri Sep 07, 2012 12:36 pm
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:
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