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 space and indent the markup inside the
// <span> element.
writer.WriteLine();
writer.Indent++;
writer.Write("<img src = '../image/tipOp.gif'/>");
writer.WriteLine();
writer.Indent--;
writer.RenderEndTag();
}
protected override void RenderPreText(HtmlTextWriter writer)
{
}
}
重载TreeView的TreeNode在节点后面加一个小图标哈哈自己做的
楼主加油!!
扩展comboBox
重载WndProc函数 截获WM_NC_PAINT WM_PAINT 等消息,这上面是一个详细的例子 E文的 不过很好懂