Treeview Question

  • Thread starter Thread starter Bart Schelkens
  • Start date Start date
B

Bart Schelkens

Hi,

i'm using the treeview from the Microsoft.Web.UI.Webcontrols.Treeview.

It works fine.
But my problem is that I don't get scrollbars if my treeview is too long or
too wide for my frame.
What can I do about this?

Thx.
 
Wrap your treeview in a div. In the style attribute of the div set the
height and width properties and also set overflow:auto, therefore when the
contents of the div exceed the specified height or width settings scrollbars
will appear.
e.g
<div style="height:600px;width500:px;overflow:auto">
!--Treeview Here--!
</div>
 
Thx
it works just fine now

Steve Flitcroft said:
Wrap your treeview in a div. In the style attribute of the div set the
height and width properties and also set overflow:auto, therefore when the
contents of the div exceed the specified height or width settings scrollbars
will appear.
e.g
<div style="height:600px;width500:px;overflow:auto">
!--Treeview Here--!
</div>
 
I found a new problem (sorry).

I develop with my screen resolution 1024x768 and the div works just fine.
When I change my resolution to 800x600 I can't reach the horizontal
scrollbar.
Is there a way to dynamically change the size of the DIV according to the
screen-resolution?
 
Yup, you could use some javascript within the body onload event to query the
client resolution.and depending which screen res set the appropriate height
for the div
e.g
var size=screen.height;
var divsize;
switch (true)
{
case (size==600):
divsize=X;
case (size==768):
divsize=Y;
}
document.all.yourdiv.style.height=divsize;
 
I downloaded the IE controls but when I compile them i don't get the dll.
can u provide me the dll directly
Thanx
Nitin
 
Back
Top