C#如何重绘控件
来源:百度知道 编辑:UC知道 时间:2024/06/17 16:58:47
学习阶段,最好给个简单例子
public class SuperTreeNode : TreeNode
{
protected override void RenderPostText(HtmlTextWriter writer)
{
// Set attributes and values along with attributes and styles
// attribute defined for a <span> element.
writer.AddAttribute(HtmlTextWriterAttribute.Onclick, "MyTest(this)");
writer.AddStyleAttribute(HtmlTextWriterStyle.Color, "Red");
writer.RenderBeginTag(HtmlTextWriterTag.Span);
// Create a spac