Potential problem in openwindow

Mac OSX specific forum
jesperbrannmark
Enthusiast
Enthusiast
Posts: 536
Joined: Mon Feb 16, 2009 10:42 am
Location: sweden
Contact:

Potential problem in openwindow

Post by jesperbrannmark »

I use lion and pb 4.6. I wanted to post this here before making a big fuss in the bug reports.

When opening a window we use #pb_window_systemmenu to have the close, maximize, minimize buttons there.
If I close a window and then open it up, the closebutton is there. Anyone can confirm?

Code: Select all

OpenWindow(0,0,0,1024,800,"Window")
StringGadget(0,0,0,1024,800,"Close me")
Repeat
Until WaitWindowEvent(5)=#PB_Event_CloseWindow
CloseWindow(0)

OpenWindow(0,0,0,1024,800,"Window")
StringGadget(0,0,0,1024,800,"I dont have a close button - no #pb_window_systemmenu")
Repeat
Until WaitWindowEvent(5)=#PB_Event_CloseWindow
CloseWindow(0)
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3944
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: Potential problem in openwindow

Post by wilbert »

I think it has to do with the coordinates.
If the window is placed below the menu bar the problem doesn't exist.

Code: Select all

OpenWindow(0,0,40,1024,800,"Window")
StringGadget(0,0,40,1024,800,"Close me")
Repeat
Until WaitWindowEvent(5)=#PB_Event_CloseWindow
CloseWindow(0)

OpenWindow(0,0,40,1024,800,"Window")
StringGadget(0,0,40,1024,800,"I dont have a close button - no #pb_window_systemmenu")
Repeat
Until WaitWindowEvent(5)=#PB_Event_CloseWindow
CloseWindow(0)
jesperbrannmark
Enthusiast
Enthusiast
Posts: 536
Joined: Mon Feb 16, 2009 10:42 am
Location: sweden
Contact:

Re: Potential problem in openwindow

Post by jesperbrannmark »

#PB_Window_ScreenCentered| #PB_Window_SystemMenu
Also works as flags - setting the window to center of screen.
thanks
Post Reply