Can I treat a panel as a lightbox without it closing when user clicks outside of it?


#1

Can I get all the benefits of a lightbox – a 50% black that covers the entire screen, except for the contents of the dynamic panel that is being treated as a lightbox – without the effect where if the user accidentally clicks outside, the panel closes?

I know I can create my own giant 50% black rectangle, but then I need code to figure out how to size it to the larger of my page’s width & height vs. their browser’s width & height, and I probably want to do that on pageResize.

Axure’s “lightbox” offers all of that by magically covering the entire window in 50% black, independent of scrolling, resizing, etc.

Can I get all of that without the added functionality where clicking outside the lightbox panel closes the panel?

Thanks.


#2

You can have a hidden giant 50% black rectangle that dynamically fills the viewport (along with on page resize) using Window.width and Window.height.

Here’s a demo: example-rectangle.rp (52.0 KB)

(BTW note the idea of having the resize operation on an onMove event on a hidden widget called RectangleSizer. This is so that I can have that in one place, called by the button click and the page resize and avoid duplication.)


closed #3

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.