Re: [qooxdoo-devel] Automatic blocker setting on opening/closing windows?
Brought to you by:
ecker,
martinwittemann
From: Christian S. <sch...@1u...> - 2009-03-30 14:21:07
|
Hi Cajus, I would use a listener on "changeVisibility" for my own window class. To get the application root use: "qx.core.Init.getApplication().getRoot()". [code] qx.Class.define("test.MyWindow", { extend : qx.ui.window.Window, construct : function(caption, icon) { this.base(arguments, caption, icon); this.setModal(true); this.addListener("changeVisibility", this.__onChangeVisibility, this); }, members : { __onChangeVisibility : function(event) { var root = qx.core.Init.getApplication().getRoot(); if (event.getData() === "visible") { root.setBlockerColor("#73B3D9"); root.setBlockerOpacity(0.5); } else { root.resetBlockerColor(); root.resetBlockerOpacity(); } } } }); [/code] Cheers, Chris Cajus Pollmeier schrieb: > Hi qooxdooers, > > I'm currently dimming the background when the user opens a new (modal) window using something like this: > > this.getRoot().set({ blockerColor: '#73B3D9', blockerOpacity: 0.5 }); > > It works pretty fine, but I'd like to subclass Window and do this automatically for modal dialogues and the problem is "this.getRoot()" in the moment. How can I access the blocker from within my class? Or do I have to fire an event to let Application handle this? > > Thanks in advance, > Cajus > > ------------------------------------------------------------------------------ > _______________________________________________ > qooxdoo-devel mailing list > qoo...@li... > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > |