ラベル window の投稿を表示しています。 すべての投稿を表示
ラベル window の投稿を表示しています。 すべての投稿を表示

2012年3月28日水曜日

Resize Behavior

I couldn't find where anyone had created a Resize Behavior (you know, to go along with the floatingBehavior so you can resize a "window")...

So I took a swing at it. You cantry it out hereand I alsoposted a blog entryon it.

Many thanks toGarbin, whose blog seems to currently be the best (or only?) source of documentation on behaviorsBig Smile [:D]

This is ULTRA cool and something I had been wondering about. Thanks for offering and implementation!

It works great!


Hi,

great work! Suggestion: what about an implementation of your ResizeBehavior based on the IDragSource and IDropTarget interfaces provided by the Atlas framework?

Hello,

thanks for your solution, always wondered how todo that.

However I get a JS-error:

Sys undefined

Probably I'm just missing a reference or something?!


You probably have one of two problems:

1. You are using the January CTP of Atlas, which uses a different namespace.

2. Something is wrong in your referencing of Atlas scripts, and the correct script files are not referenced in the proper order.

Hope this helps.


Thanks,

that helped!

It was an old CTP, you just spared me a lot of work.

Hi,

this articlefrom my blog could help you with the Atlas DragDrop system. Hope it helps.


It is quite cool that you can do something like that by plugging into the framework. It seems a little buggy though. It was resizing when I clicked on the page after I had finished dragging.

I created a product calledWebDialog that lets you achieve the same sort of effect. I can emphasise with how hard it is to get dragging and resizing right.

You can see some samples of what I did here: http://www.newtonsoft.com/products/webdialog/onlinedemo.aspx

ResizeControlExtender causes panel to have 0px width and 0px height

All,

I am adding a ResizeControlExtender to a panel that already has a DragPanelExtender and am getting some very odd behavior. The window I want to resize is created dynamically and I add the ajax extender programatically as well. I am able to put a resize handle on the popup window but when I mouse over the handle the panel collapses to 0px width and 0px height. I have specified all of the properties as follows:

ResizableControlExtender resizeWindow = new ResizableControlExtender();

resizeWindow.ID = "timePanelResize" + i;
resizeWindow.TargetControlID = "timePanel" + i;
resizeWindow.HandleCssClass = "handleImage";
resizeWindow.ResizableCssClass = "resize";
resizeWindow.MinimumWidth = 200;
resizeWindow.MaximumWidth = 200;
resizeWindow.MinimumHeight = 24;
resizeWindow.MaximumHeight = 600;
resizeWindow.HandleOffsetX = 186;
resizeWindow.HandleOffsetY = 187;
dragWindowPanel.Controls.Add(resizeWindow);

I am using c#, .Net 2.0, AJAX v1.0.61025, IE 7 and Firefox 2.01. on mouse over the following behavior occurs; In IE it flickers and collapses in Firefox it flickers and the height collapses to the min height. Also, the handle is extremely difficult to grab... Also, the mouse must be in exactly the right pixel position (about 1px wide and tall) in order to grab the handle.

Anybody else see behavior like this? If so, is there a solution?

Thanks,

Kevin

There's an old forum thread about this, but the gist is that you add another Panel/DIV wrapper so the two extenders can point at/modify different HTML elements.