I'm looking to build my first extender and the one I've chosen is a variation on the CollapsiblePanel so I've started with that control as my base. I've removed the ExpandControlID property and forced the CollapseControlID to always be a toggle. I've also added a property, CollapsePanelID, which is the ID of a second panel. At startup, the TargetControlID is expanded, the CollapsePanelID is collapsed and the CollapseControlID is used to toggle the two of them together.
I'm having trouble setting up the animation for the second panel. For the first, I see the line:
_animation.set_target( this );
I can't figure out how to call a similar function for the CollapsePanelID. I thought maybe there was a Sys.UI.Panel object I could create and configure for the second panel but I don't see one. The idea is that I would set up a second animation for the second panel, then in the _doOpen and _doClose functions, I'd play it along with the existing one.
This is for my own edification, not for any specific problem. I've already been able to do this functionally with two CollapsiblePanels. Just picked this as my project for learning extenders. Even as I write this, I'm thinking there might be a better way to do this but it would still involve the ability to create a Sys.UI control that maps to an asp:panel object.
Thanks,
Kyle
Check out the JavaScript inFAQ item #13. It does essentially what you want - given an ID"Link1" it creates a newSys.UI.Control wrapper for it. This is what you need to pass intoset_target.
It's also worth mentioning that we've got a similar control in the works for the next release of the Toolkit. You check it out in the Prototypes project on CodePlex if you're interested.
Thanks,
Ted
Thanks, Ted. That FAQ item does look like what I want. I'll check it out.
Downloaded the source from CodePlex and had trouble opening the Prototypes project ("The project type is not supported by this installation"). I'll get it worked out but thought I'd raise the issue.
Thanks again,
Kyle
Never mind about the error. Read the instructions, installed the web app update and all is well.
No comments:
Post a Comment