0

Setting spaces to a treecell

asked 2010-04-12 04:35:22 +0800

yunchang83 gravatar image yunchang83
42

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?

delete flag offensive retag edit

10 Replies

Sort by ยป oldest newest

answered 2010-04-12 04:43:03 +0800

yunchang83 gravatar image yunchang83
42

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?

link publish delete flag offensive edit

answered 2010-04-12 19:44:06 +0800

yunchang83 gravatar image yunchang83
42

hi, anyone knows any solution to this?

link publish delete flag offensive edit

answered 2010-04-12 21:37:57 +0800

Cogito gravatar image Cogito
66 1

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>

link publish delete flag offensive edit

answered 2010-04-13 01:57:48 +0800

yunchang83 gravatar image yunchang83
42

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?

link publish delete flag offensive edit

answered 2010-04-13 20:02:17 +0800

yunchang83 gravatar image yunchang83
42

anyone else has any idea on how to do this?

link publish delete flag offensive edit

answered 2010-04-14 20:19:47 +0800

yunchang83 gravatar image yunchang83
42

hi, i am still awaiting solution to this problem. is there any updates? thanks in advance.

link publish delete flag offensive edit

answered 2010-04-15 21:20:30 +0800

Cogito gravatar image Cogito
66 1

Try
<treecell>
<label value=" Test" pre="true"/>
</treecell>

link publish delete flag offensive edit

answered 2010-04-16 02:57:07 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

updated 2010-04-16 02:59:48 +0800

@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

link publish delete flag offensive edit

answered 2010-04-22 22:09:35 +0800

yunchang83 gravatar image yunchang83
42

hi terry, thanks for the codes, but then that is for normal label. for treecell, i have tried it, it doesn't work.

link publish delete flag offensive edit

answered 2010-04-23 04:34:13 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

Have a try with placing a label in the treecell !

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2010-04-12 04:35:22 +0800

Seen: 388 times

Last updated: Apr 23 '10

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More