Advertisement
Advertisement
| 02.01.2008 at 02:13PM PST, ID: 23131008 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: |
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Drawing;
using System.Web.UI.Design;
using System.Web.UI.Design.WebControls;
namespace AJAXEnabledWebApplication1
{
[DesignerAttribute(typeof(GPBoxDesigner)),
ToolboxData("<{0}:GPBox runat=\"server\"></{0}:GPBox>")]
public class GPBox : Panel
{
public GPBox()
{
this.BorderStyle = BorderStyle.Solid;
this.BorderWidth = 1;
this.Width = 300;
this.Height = 300;
GPBoxDesigner.WasClicked += null;
GPBoxDesigner.WasClicked += new EventHandler(this.RespondToClick);
}
private void RespondToClick(object sender, EventArgs e)
{
////////////////// NOTHING HAPPENS ///////////////////
this.BackColor = System.Drawing.Color.Red;
this.BorderStyle = BorderStyle.Groove;
}
}
public class GPBoxDesigner : ControlDesigner
{
public static event EventHandler WasClicked;
protected override void OnClick(DesignerRegionMouseEventArgs e)
{
base.OnClick(e);
if (WasClicked != null)
{
WasClicked(null, null);
}
}
}
}
|