-
Composite Controls
Hi all,
I'm developing server controls with composition techniques and I have a problem.
Like old Active X, I want to resize in design time the child controls inside
my new control.
I have this code on main class:
[Designer(typeof(MyControl.Controls.Design.MyDesigner)),
ParseChildren(true),
PersistChildren(false)]
[ToolboxData("<{0}:MyControl runat=server></{0}:MyControl>")]
public class MyControl : WebControl, INamingContainer
{
private TextBox textBox1;
private LinkButton linkButton1;
protected override void CreateChildControls()
{
linkButton1=new LinkButton();
textBox1 = new TextBox();
Controls.Add(linkButton1);
Controls.Add(new LiteralControl(" "));
Controls.Add(textBox1);
}
}
And now on design time I want to resize with the mouse de textbox1 like Microsoft
TextBox Server Control does on design time.
I try adding a designer like this:
public class MyDesigner : ControlDesigner
{
public override string GetDesignTimeHtml()
{
MyControl control = (MyControl)Component;
ControlCollection childControls = control.Controls;
return base.GetDesignTimeHtml();
}
But I can not catch the resize event because on the ControlDesigner class
there is a protected method OnControlResize that I have not access.
Any solutions about this?
Thanks.
Vincent.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks