0

long Button label

asked 2009-02-17 16:08:59 +0800

caclark gravatar image caclark
1753 2 5
http://clarktrips.intltwi...

Is it possible to force the label of a Button to wrap text? Here's a snippet out of the Live Demo->Forms and Inputs->Buttons page that I changed and re-ran:
<button label="Above with some really long text" image="/img/Centigrade-Widget-Icons/ArrowUp-16x16.png"
hoverImage="/img/Centigrade-Widget-Icons/ArrowUpGreen-16x16.png" orient="vertical" width="125px" />

The label gets clipped after the word "some". I would like to have a multiline label. I have a real app that I've done this with using some fixed width buttons. It seems that, no matter what my width, I always have some text too long for the button.

Any suggestions?

Thanks,
Cary

delete flag offensive retag edit

3 Replies

Sort by ยป oldest newest

answered 2009-02-17 16:31:08 +0800

robertpic71 gravatar image robertpic71
1275 1

updated 2009-02-17 16:31:57 +0800

Hi

Maybe there is an easier way (i am new in CSS) , but i use this:

I add white-space: pre; to the style. I named my sclass "icon" and use it in the button.
<style>
.icon, .icon .z-button-cm {
font-family: ${fontFamilyT};
font-size: ${fontSizeM}; color: blue;
cursor: pointer; white-space: pre;
}
....
</style>
<space width="150px"/>
<button id="newbox" image="/images/LadePlus_32.png" orient="vertical"
label="Enter new Box" sclass="icon"/>

See the result here (the menubar are simple buttons with some style).

Note: The Visual Editor ignores my linebreak. If you create your button form java use "Enter\nnew Box".

/Robert

link publish delete flag offensive edit

answered 2009-02-17 17:36:16 +0800

caclark gravatar image caclark
1753 2 5
http://clarktrips.intltwi...

Thanks Robert! I had to change the white-space to pre-wrap, but that made it work great!

Cary

link publish delete flag offensive edit

answered 2009-07-31 12:44:36 +0800

baskaraninfo gravatar image baskaraninfo
536 2 2 9

It doesn't work for me.

My version is:
ZK Packages: 3.6.2

Which version you have been working on?

Thanks.

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: 2009-02-17 16:08:59 +0800

Seen: 326 times

Last updated: Jul 31 '09

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