I just took a quick look at the TerraSheetSkin source, and now see what is happening behind the scenes. A ContainerMouseListener is added to the Display to handle mouse events (when the sheet is opened). You should be able to do the same thing and close the sheet depending on where the x & y coordinates are.
That is much tidier than invisible windows :) Chris On 18 August 2010 18:34, Chris Bartlett <[email protected]> wrote: > A Pivot Sheet is always modal, so only captures mouse clicks within its > bounds. > http://pivot.apache.org/tutorials/windows.html > > If you use a Frame or Dialog (either standard Pivot ones, or your own > custom version), you will be able to capture mouse clicks from outside of > its bounds. > A simple way to do this might be to first display a transparent window over > the whole GUI, and set a mouse listener for it which would close the > Frame/Dialog when you require. > Then you could open your Frame/Dialog using the transparent window as the > parent. > > There are probably other cleaner ways of doing this. > > Regards, > > Chris > > On 18 August 2010 17:29, Duto <[email protected]> wrote: > >> >> Hello, >> >> When I have Sheet (modal window) display, is there a possiblility to >> capture >> the click event outside the Sheet because I would like to close the Sheet >> when the user click outside the model form ? >> >> Best regards. >> >> Duto >> -- >> View this message in context: >> http://apache-pivot-users.399431.n3.nabble.com/click-event-outside-Sheet-modal-window-tp1203168p1203168.html >> Sent from the Apache Pivot - Users mailing list archive at Nabble.com. >> > >
