-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I have this problem on button style.
i need that a label of button is splitted on two line, like this
"SEND TO
ANOTHER PAGE"
for visual reason, i have more buttons and all buttons should have same size.
I try to set widt in this way:
<button id="sendOut" label="Send to another page" width="80px" sclass="text3strong" />
but the size of button is the same if i put 80px or 10px in width property .
i try to insert \n in labe, like this:
sendOut.setLabel("Send to"+"\n"+" another page" )
but i have always the same result.
where do i wrong? how do i resize the button width?
thanks all.
I am not sure it is possible to have multi-line buttons other than set the width correctly and the label breaks off at the right place.
There may be a way around this:
style a <label> appropriately to look like a button, and use the multiline feature of the label. (note: use instead of \n, since it is xml).
hope it helps.
-JJ
thank u for your advice, but there are too difficult,
but i ask why don't zk respect the width of button that i set?
Bobzk i don't understand if you say to insert label into button tags or use label to fire event to manage
thanks guys
Hi VincenzoDC,
You have to override default button style as follows:
<zk> <style> .z-button .z-button-cm { white-space: normal; } </style> <button id="sendOut" label="Send to another page" width="80px" sclass="text3strong" /> </zk>
Asked: 2012-06-27 15:39:51 +0800
Seen: 239 times
Last updated: Jul 06 '12