-
FEATURED COMPONENTS
First time here? Check out the FAQ!
hi,
i would like to set spaces, say 10 spacing, in front of a text in my treecell. i have tried doing this: " Test", but it still returns "Test". how am i able to set the spacing?
erm... in the above text "Test" with spacing, it is supposed to have some spacing, but even when i put 10 spaces, it still shows as one space. any idea?
hi, anyone knows any solution to this?
Hi yunchang83,
You may achieve the effect you want by adjusting the margin between the tree node icon and the text.
Refer to the ZK styling guide here
The sample code below would display the effect you want:
<zk>
<style>
.myTree .z-tree-ico,
.myTree .z-tree-last {
margin-right: 50px
}
</style>
<tree width="400px" sclass="myTree">
<treechildren>
<treeitem>
<treerow>
<treecell label="Item 2" />
</treerow>
<treechildren>
<treeitem>
<treerow>
<treecell label="Item 2.1" />
</treerow>
</treeitem>
</treechildren>
</treeitem>
</treechildren>
</tree>
</zk>
hi, thanks for the solution, but that isn't the thing i am looking for. if you were to look at the guide, refer to 2nd column, Description column. that is the column i need to have spacing to differentiate between the different tree levels. still, any idea on that?
anyone else has any idea on how to do this?
hi, i am still awaiting solution to this problem. is there any updates? thanks in advance.
@yungchang83
ZUML is XML, not HTLM, so you can use & # 1 6 0; as a special character set for spacing.
read the Developer's Guide: Chapter 7 ZUML with the XUL Elements; Basic Components: Label
<zk> <label value="Hello" /> <separator /> <label value=" & # 1 6 0 ; & # 1 6 0 ; & # 1 6 0 ; & # 1 6 0 ; & # 1 6 0 ; & # 1 6 0 ; Hello" /> </zk>
best
Stephan
hi terry, thanks for the codes, but then that is for normal label. for treecell, i have tried it, it doesn't work.
Have a try with placing a label in the treecell !
Asked: 2010-04-12 04:35:22 +0800
Seen: 388 times
Last updated: Apr 23 '10