lol, I was assuming that you had to set your height manually(depending on some configs). Vflex works as a charm indeed.
chillworld ( 2016-04-11 11:38:23 +0800 )edit-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I have a problem, I need a scrollable tree with multiple columns that has dynamic height.
I've found two solutions, but none of them is perfect.
1) defining number of rows
in tree
element. That works OK - header is static and content is scrolled, but this is not dynamic tree.
2) stetting style="overflow-y:auto"
on tree element that but that scrolls whole tree (including header) and she scrollbar is placed over the header - so the label is partially unreadable.
Something tells me that some smart JS can calculate the rows attribute (but I wonder if there is some better way to do it). I'd like to upload some screen shots of the example but my Karma is to low.
example fiddle
zkfiddle.org/sample/2gsu84m/1-Table-scrolling-example
Thanks for any ideas.
Hey Jovkub,
I altered a little bit your sample :
http://zkfiddle.org/sample/2gsu84m/2-Table-scrolling-example
Look at the right one.
Now, looks like I discovered a small GUI issue of ZK.
height="100%
seems it counts for z-tree-body
but he don't calculate the z-tree-header
height with it.
That's why I needed it to fix with setting the same height as the parent object.
With MVVM you can make this dynamic => height="@load(vm.treeHeight)"
(in div and tree)
Then in the VM you just have a getter :
public String getTreeHeight() {
return treeHeight; // where treeHeight = "135px"
}
Hope this can help you further.
If any more questions, just ask.
Greetz Chill.
After some playing with trees I've found that vflex
instead height
shall be used on tree
element. Now it works like charm.
zkfiddle.org/sample/2gsu84m/3-Table-scrolling-example
lol, I was assuming that you had to set your height manually(depending on some configs). Vflex works as a charm indeed.
chillworld ( 2016-04-11 11:38:23 +0800 )editAsked: 2016-04-08 14:41:24 +0800
Seen: 18 times
Last updated: Apr 11 '16
How to deactivate load on demand in a tree component?
Facing issue in masking on phone [closed]
coerceFromString_ override no longer works from 6.5.1 [closed]
Execute Javascript on component visible
Is there a way to resolve view model properties as input to client side javascripts?
scrollbar listner for 2 grid [closed]
Can you create fiddle for seconden option? I maybe have an idea. Just paste link as text.
chillworld ( 2016-04-08 19:42:59 +0800 )editExample added, i have low Karma so link is only textual.
Jovkub ( 2016-04-08 21:01:52 +0800 )edit