From: Keith C. <kei...@dc...> - 2001-05-18 03:39:10
|
thanks I try that I tried invoking the even but I forgot the ' thanks Keith At 07:40 AM 5/17/01 +0200, you wrote: >If you have already registered an event listener on your class ignore the >following code. Otherwise, this is how you register an event listener > >This code goes inside your class declaration. >--------------------------------------------------------------- > this.events = new EventListener(this); > this.events.onresize = function(e) { > o = e.getTarget(); > o."myfunction"(); <-- Insert function name here > }; > this.addEventListener(this.events); >------------------------------------------------------------------ > > >To create an event there are two ways you can do it. > >a) You can set the size of your panel to its existing size >------------------------------------------------------ > > >panel.prototype.setalign = function (align){// set caption align > this.align=align; > this.setSize(this.getWidth(),this.getHeight()); >} > >-------------------------------------------------------- > >or b) You can fire an event using the invokeEvent() method >(line 42ish in listeners.js) > > > > > >--------------------------------------------------------- > >panel.prototype.setalign = function (align){// set caption align > this.align=align; > this.invokeEvent('resize'); >} > >---------------------------------------------------------- > > > >Hope this helps you. > >Scott Bristowe > > >_______________________________________________ >Dynapi-Widgetdev mailing list >Dyn...@li... >http://lists.sourceforge.net/lists/listinfo/dynapi-widgetdev |