winform中怎么把treeview背景设置为透明
winform中怎么把treeview背景设置为透明??
求救,谢谢!!
------解决方案--------------------MARK...
------解决方案--------------------backcolor-> web-> transparent
------解决方案--------------------呵呵,好像不支持,我错了
------解决方案--------------------不支持
------解决方案--------------------//自绘背景
//treeView1.DrawMode = TreeViewDrawMode.OwnerDrawAll;
private TreeNode LastTopNode = null;
private void treeView1_DrawNode(object sender, DrawTreeNodeEventArgs e)
{
if (treeView1.TopNode != LastTopNode) // 处理滚动的情况
{
LastTopNode = treeView1.TopNode;
treeView1.Invalidate();
}
if (e.Node.Bounds == Rectangle.Empty) return;
if (pictureBox1.Image != null) // 绘制低图
e.Graphics.DrawImage(pictureBox1.Image,
e.Bounds, e.Bounds, GraphicsUnit.Pixel);
e.Graphics.DrawString(e.Node.Text, Font, Brushes.Black, e.Node.Bounds);
e.DrawDefault = false;
e.DrawDefault = false;
}
private void treeView1_BeforeExpand(object sender, TreeViewCancelEventArgs e)
{
treeView1.Invalidate();
}
private void treeView1_BeforeCollapse(object sender, TreeViewCancelEventArgs e)
{
treeView1.Invalidate();
}
------解决方案--------------------region?