How to anchor TreeView Control in Web Browser

W

William

I've added a treeview control to a web application. It works fine except
that the entire control moves with the page when the page is vertically
scrolled. I've looked on all the properties lists and can't find anything
that will correct this. Does anyone know what the method/property is to
control this behavior?

ASP.NET 2.0, IE 7.0, bound to XML data source (file).

Thanks in advance.

William
 
M

Mike Gleason jr Couturier

William said:
I've added a treeview control to a web application. It works fine except
that the entire control moves with the page when the page is vertically
scrolled. I've looked on all the properties lists and can't find anything
that will correct this. Does anyone know what the method/property is to
control this behavior?

ASP.NET 2.0, IE 7.0, bound to XML data source (file).

Thanks in advance.

William

Hi,

There is a rather not-cross browser friendly CSS rule :

style="position: fixed;"
An element with position: fixed is positioned at the specified coordinates
relative to the browser window. The element's position is specified with the
"left", "top", "right", and "bottom" properties. The element remains at that
position regardless of scrolling. Works in IE7 (strict mode)

Otherwise you can implement an ungly Javascript that recalculates and
reposition the tree whenever the user scrolls the page.

A third way (the more compatible one I think) would be to put the tree in a
frame. The page would have 2 frames, one for the tree, the other for the
content...

Those are only suggestions, and I'm not talking about political views
attached to each of it and never will..

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top