Microsoft Treeview background problem.

Source: Internet
Author: User

I have a Treeview in a my Asp.net page, it works fine when the page has a background color, but when I set a background-image (which is defined in the <body> tag) on the page, a terrible thing happened, the Treeview no longer seems to be transparent, and Insted it is shown as a white box.

I have tried Treeview. styles. add () and added background colors, this seems to work, but it only allows me to change the color to something like red or blue, it doesnt allow transparent as an option. then I hacked into Treeview. HTC (if you installed the Microsoft Internet Explorer webcontrols for ASP. net, you can find it in the "wwwroot/webctrl_client/defaults 0" folder), and get the idea that it can't be transparent. treeview. HTC is using a viewlink, which is actually a seperate document. I have changed the Treeview. HTC so that Treeview support transparent background, here is the code:

Function Buildtreefromroot ()
{

Bodynode. style. Direction = Element. currentstyle. direction;
// This line is added for supportting transparent background
Bodynode. style. Background =   " Transparent " ;
VaR Head = Element.doc ument. createelement ( " Head " );

}

As you can see, I just add a line code in the "buildtreefromroot" function, but it works
Hope this helps

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.