Modal Dialog and MessageRequester ?

Linux specific forum
frederic
User
User
Posts: 56
Joined: Thu Jan 05, 2006 11:22 pm

Modal Dialog and MessageRequester ?

Post 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 ?
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post 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
frederic
User
User
Posts: 56
Joined: Thu Jan 05, 2006 11:22 pm

Post 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
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

I will submit some bug reports. DisableWindow() doesn't work ok on Linux.
Post Reply