2.可伸缩面板功能:
a.可以做为一个容器,可以放别的控件,比如datalist、datagrid、gridview。
b.可以伸缩内容。
3.我的ExPanel思路:上面一个Div做为一个标题,下面一个Div做为内容,再放一个Panel做为其它服务器控件的容器。
实现效果如图:
下面是部分代码:
1
2 output.Write(" <div onclick='TitleClick("+this.ClientID+");' id='" + this.ClientID + "dHead' style='background-image:url(" + _headbgimg + ");background-color:" + _headbgcolor.Name + "; border:" + this._borderstyles + ";" + this.Width.ToString() + ";padding:5px 5px 0px 5px'><span style='color:" + _titlecolor.Name + "'>" + this._title + "</span></div>");
3 output.Write("<div id='" + this.ClientID + "dBody' style='background-color:" + _backgroundcolor.Name + ";border-bottom:" + this._borderstyles + "; border-left:" + this._borderstyles + "; border-right:" + this._borderstyles + "; " + this.Width.ToString() + "; display:block;padding:5px 5px 5px 5px '>");
4
5 base.RenderContents(output);
6 output.Write("</div>");
源代码:2 output.Write(" <div onclick='TitleClick("+this.ClientID+");' id='" + this.ClientID + "dHead' style='background-image:url(" + _headbgimg + ");background-color:" + _headbgcolor.Name + "; border:" + this._borderstyles + ";" + this.Width.ToString() + ";padding:5px 5px 0px 5px'><span style='color:" + _titlecolor.Name + "'>" + this._title + "</span></div>");
3 output.Write("<div id='" + this.ClientID + "dBody' style='background-color:" + _backgroundcolor.Name + ";border-bottom:" + this._borderstyles + "; border-left:" + this._borderstyles + "; border-right:" + this._borderstyles + "; " + this.Width.ToString() + "; display:block;padding:5px 5px 5px 5px '>");
4
5 base.RenderContents(output);
6 output.Write("</div>");
/Files/HeroBeast/ExPanel.rar