axum Posted April 15, 2003 Posted April 15, 2003 Hi (again!), ok i have a "display section" in the top half of my page and a TreeView control in the other half, when nodes are checked on it, and a "Save" button is clicked, i go off and do some processing but need to display the checked nodes to the user... Problem is i want to be able to limit the size of the screen this takes up and ideally for some vertical scrollbars to appear so they can scroll through the list, thus NOT pushing the treeview out of view. I HAVE got this working fine with my TreeView by giving it a height percentage and then a STYLE="POSITION: absolute", which means if there are loads of nodes, scrollbars appear.... Any good tricks, or controls that will allow me to do this? Many thanks Axum Quote
Hotdog Posted April 22, 2003 Posted April 22, 2003 There are two easy ways to control the size of displayed items on a page. 1) Place <DIV> tags around your table or cell that you don't want to grow. Example: <DIV style="Overflow: auto; height: 100; width: 200"> <TABLE id="table1" width="100%" height="100%"> <TR> <TD></TD> </TR> </TABLE> </DIV> The example above will "trap" your table within the DIV by never allowing it to grow beyond the height and width parameters you set to fit your page. If it does, scroll bars appear to handle the overflow. Once you have done this, you can set the scroll bars in the "Overflow" event to always appear or display as needed, etc. Also, the horizontal and vertical scroll bars work independently of each other, so that may help in your formatting. 2) Input an HTML panel control within the cell or table you are using. You can set the properties of the panel similar to the DIV, but with a panel, you can call it in your code and control it just as you would any other control. You can fill the panel with whatever you want. Any property you assign the panel gets inherited to all nested controls (similar to grouping). You make the panel visible=false, everything within the panel is invisible, etc. Hope that helps. Once you get used to this, you can literally set anything within them - datagrids, forms, etc. when you need to conserve space. If you need anything else or if this doesn't help, let me know. There are other, more complicated ways, but this would be the easiest way out. Quote
axum Posted April 23, 2003 Author Posted April 23, 2003 many thanks, i tried the panel and it never worked properly so i'll give your DIV option a try, cheers! Axum Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.