use scrollbars in Treeview on website

T

ton

Hi,

How can I limit the size of a treeview on a webform so the user can scroll
on its page.

I've allready placed the control in a DIV like:

<div style="OVERFLOW:auto; WIDTH:100%; HEIGHT:140px">
<asp:TreeView style="Z-INDEX: 100; LEFT: 0px; POSITION: absolute; TOP:
0px" Height="200px" id="TreeView1" runat="server" ImageSet="XPFileExplorer"
NodeIndent="15" Width="176px" ShowLines="True">
<ParentNodeStyle
Font-Bold="False"></ParentNodeStyle>
<HoverNodeStyle ForeColor="#6666AA"
Font-Underline="True"></HoverNodeStyle>
<SelectedNodeStyle BackColor="#80FFFF"
HorizontalPadding="0px" VerticalPadding="0px" Font-Underline="False"
BorderStyle="Solid"></SelectedNodeStyle>
<NodeStyle NodeSpacing="0px" HorizontalPadding="2px"
ForeColor="Black" VerticalPadding="2px" Font-Size="8pt"
Font-Names="Tahoma"></NodeStyle>
</asp:TreeView>
</div>

but nothing happens, the entire list is shown and visible on the webpage

thanx


ton
 
M

Mick Wilson

You've defined the treeview's position as absolute, taking it out of
the parent div. Try applying the overflow property to the treeview
itself or redesigning to preserve the relationship between the
container div and your treeview control so that the overflow property
applies successfully to both.
 

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,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top