Page 1 of 1

Modal Dialog and MessageRequester ?

Posted: Sun Mar 04, 2007 2:15 pm
by frederic
Hello, i can't make a program with modal window or messagerequester

the window_parent_id in openwindow doesn't work
and with messagerequester i can click on the back window

any information ?

Posted: Sun Mar 04, 2007 2:46 pm
by Trond
There seems to be a bug with the message requesters. They have their own taskbar buttons as well.

Can you try this? (It works on Windows.)

Code: Select all

OpenWindow(0, 0, 0, 512, 384, "", #PB_Window_ScreenCentered | #PB_Window_SystemMenu)
CreateGadgetList(WindowID(0))
ButtonGadget(0, 10, 10, 100, 25, "")


Repeat
  Select WaitWindowEvent()
    Case #PB_Event_Gadget
      DisableWindow(0, 1)
      OpenWindow(1, 0, 0, 200, 200, "", #PB_Window_WindowCentered | #PB_Window_SystemMenu, WindowID(0))
    Case #PB_Event_CloseWindow
      If EventWindow() = 0
        Break
      ElseIf EventWindow() = 1
        CloseWindow(1)
        DisableWindow(0, 0)
      EndIf
  EndSelect
ForEver

Posted: Sun Mar 04, 2007 2:52 pm
by frederic
i've already tried to disable window but you can click on the "cross" to close the back window and the message is record in the queue so when you validate the MessageRequester, the back window is closed

Posted: Sun Mar 04, 2007 4:57 pm
by Trond
I will submit some bug reports. DisableWindow() doesn't work ok on Linux.