Page 1 of 1

Can not trigger resizing a disabled window

Posted: Mon Apr 01, 2024 5:28 pm
by Martin Verlaan
Is there a way to trigger #PB_Event_SizeWindow with a disabled window?

Code: Select all

OpenWindow(0, 0, 0, 150, 50, "Window", #PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_ScreenCentered)
DisableWindow(0, #True)

Repeat
  Event = WaitWindowEvent()
  
  Select Event
    Case #PB_Event_SizeWindow
      Debug "Resize triggered" ; does not work with disabled window
  EndSelect
Until Event = #PB_Event_CloseWindow

Re: Can not trigger resizing a disabled window

Posted: Mon Apr 01, 2024 5:48 pm
by jacdelad
Does a disabled window receive any message at all?

Re: Can not trigger resizing a disabled window

Posted: Mon Apr 01, 2024 9:24 pm
by Martin Verlaan
That's a good point. :oops: Solved the problem with a timer.

Re: Can not trigger resizing a disabled window

Posted: Mon Apr 01, 2024 10:16 pm
by BarryG
Martin Verlaan wrote: Mon Apr 01, 2024 5:28 pmIs there a way to trigger #PB_Event_SizeWindow with a disabled window?
I know you solved it, but for any newbies reading: just use the ResizeWindow() command.