Floaters & Sheets

From REALbasicWiki

Jump to: navigation, search

Floating windows can cause custom sheets (sheets that you make yourself by changing the windows frame to sheet - not built-in ones like Save, Print) to not get mouse input. This effect shows up in 10.5 and above (10.5.2 latest tested version) and can make your app look as if it were hung. This problem was fixed in REALbasic 2008 Release 2.

[edit] Workaround

Hide (or Close) the floating windows when you show your sheet. The following 2 functions do this in a generic way. You will need to call app.HideFloaters in your sheets open event and app.ShowFloaters in your apps close event.


Sub HideFloaters()
for i as integer = 0 to WindowCount-1
dim w as window = Window(i)
if (w.Frame = Window.FrameTypeFloating and w.visible) then
mFloatersHidden.append w
w.Hide
end if
next
End Sub


Sub ShowFloaters()
for each w as window in mFloatersHidden
w.show()
next

redim mFloatersHidden(-1)
End Sub

you will also want the following private property declared as part of your app class


mFloatersHidden() as window

Personal tools
related