From: Robert R. <rra...@ya...> - 2000-12-09 22:39:11
|
I'm having major problems trying to get the Button widget to work with DynImage. I tried adding a setSize call when the images are loaded to fix the problem. But now in Netscape the images in the buttons disappear onload. Also, it causes NS to crash after you reload sometimes. Any help would be appreciated. There was one problem that I think I fixed, is when you say new Image(w||0,h||0). If you initialize the image to width or height to 0 in IE, then the when its finished loading it will stay 0, so I used an if statement to fix that so that you don't have to specify the size. -- // Robert Rainwater |
From: Dan S. <dy...@fu...> - 2000-12-09 23:50:42
|
I am working on a simple auto resize for DynImage. It was overly complex the way it was. It's almost done as I type this email. Dan On Sat, Dec 09, 2000 at 05:41:46PM -0500, Robert Rainwater wrote: > > I'm having major problems trying to get the Button widget to work with > DynImage. I tried adding a setSize call when the images are loaded to > fix the problem. But now in Netscape the images in the buttons > disappear onload. Also, it causes NS to crash after you reload > sometimes. Any help would be appreciated. > > There was one problem that I think I fixed, is when you say new > Image(w||0,h||0). If you initialize the image to width or height to 0 > in IE, then the when its finished loading it will stay 0, so I used an > if statement to fix that so that you don't have to specify the size. > > -- > // Robert Rainwater > > > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev |
From: Raymond S. <dst...@or...> - 2000-12-10 00:32:53
|
Bit stumped by this one. Trying to emulate dragevent (attachable/unattachable behavior) within a Widget without having to write the eventhandler as a separate ext. I've tried alot of different reference scenarios to remove a created dynevent events handler nested in a DynLayer attached to a parent layer. How can I unattach and reattach this dynamically? Thanks |
From: Eytan H. <ey...@tr...> - 2000-12-10 09:43:54
|
I have looked at how the images work. I have made somthing similair but I find more simple. I created a TImage which in its constructor creates a "real" image (as in an IMG tag) then I can play with it using function I have created. Resizing would simply mean call ImgName.width and changing it. 8an |
From: Robert R. <rra...@ya...> - 2000-12-11 20:26:03
|
The main issue with DynImage is getting the images width and height when it is done loading. Then the dynimage has to update itself and invoke some kind of event saying its ready. So ideally, you don't need to specify the w/h if you want to use the actual width/height. Because in the Button widget, it has to be able to resize itself, but it can't do so until it knows the image's width and height, unless you specify it. I beleive in IE if you say x = new Image(w||0,h||0), it will initialize the w/h to 0 even after the load (if w or h is 0), so thats one of the problems with the DynImage as it is now. -- // Robert Rainwater On 12/10/2000, 4:38:27 AM EST, Eytan wrote about "[Dynapi-Dev] Button/DynImage - I am fixing this": > I have looked at how the images work. I have made somthing similair but I > find more simple. I created a TImage which in its constructor creates a > "real" image (as in an IMG tag) then I can play with it using function I > have created. Resizing would simply mean call ImgName.width and changing it. > 8an > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev |
From: Dan S. <dy...@fu...> - 2000-12-11 22:18:25
|
Already done and working. I've actually got quite a large amount of fixes/changes coming due to a lot of problems with widgets using the new inline creation system. Currently there's only 1 very perplexing problem when using Button in another widget (pushpanel/scrollpane in particular) that is holding it back. I will be sure it's all working in IE4 before releasing anything to CVS. Did anyone figure out exactly what to do to get IE4/5 to stop selecting text for Label? Dan On Mon, Dec 11, 2000 at 03:28:27PM -0500, Robert Rainwater wrote: > > The main issue with DynImage is getting the images width and height > when it is done loading. Then the dynimage has to update itself and > invoke some kind of event saying its ready. So ideally, you don't > need to specify the w/h if you want to use the actual width/height. > Because in the Button widget, it has to be able to resize itself, but > it can't do so until it knows the image's width and height, unless you > specify it. > > I beleive in IE if you say x = new Image(w||0,h||0), it will > initialize the w/h to 0 even after the load (if w or h is 0), so thats > one of the problems with the DynImage as it is now. > > -- > // Robert Rainwater > > On 12/10/2000, 4:38:27 AM EST, Eytan wrote about "[Dynapi-Dev] Button/DynImage - I am fixing this": > > > I have looked at how the images work. I have made somthing similair but I > > find more simple. I created a TImage which in its constructor creates a > > "real" image (as in an IMG tag) then I can play with it using function I > > have created. Resizing would simply mean call ImgName.width and changing it. > > > 8an > > > _______________________________________________ > > Dynapi-Dev mailing list > > Dyn...@li... > > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev > > > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev |
From: Robert R. <rra...@ya...> - 2000-12-10 05:45:28
|
You need a reference to the eventlistener object and then you call removeEventListener(listenerobj); One way is something like: MyWidget.listener = new EventListener() MyWidget.oncreate = function(e) { var o = e.getSource(); .... } MyWidget.prototype.dosomething = function() { if (...) this.addEventListener(MyWidget.listener); else this.removeEventListener(MyWiget.Listener(); } -- // Robert Rainwater On 12/9/2000, 7:32:25 PM EST, Raymond wrote about "[Dynapi-Dev] Adding/Removing Event Layers": > Bit stumped by this one. Trying to emulate dragevent > (attachable/unattachable behavior) within a Widget without having to write > the eventhandler as a separate ext. I've tried alot of different reference > scenarios to remove a created dynevent events handler nested in a DynLayer > attached to a parent layer. How can I unattach and reattach this > dynamically? > Thanks > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev |