Jump to content

Unwanted Line Break in W3Label Caption

Recommended Posts

Unwanted Line Break in W3Label Caption in FireFox and Opera ?

W3Label Captions get linebreaks if spaces are present in the caption, in few browsers (Opera 12.17 and FireFox 32.0.3)

but I don't see any reason for this behaviour. IExplorer and Chrome do not break the line at spaces in W3Label captions.

I don't want to force the users to avoid FireFox, it is quite popular.


Pictures and sample application are attached.


Couldn't find a workaround to display a line of words in a W3Label properly.... hmmm.





Link to post
Share on other sites

The issue is, that in the SmartCL.Controls.Label.pas unit, the style property names are used the wrong way. I already send a bug report.

In that file, the style property names are used in lower case as used in a css file, but the name must be in camel case.




As workaround, you can change the property names in that file and save it.


  w3_setStyle(FContainer.Handle, 'text-overflow', 'ellipsis'); //use textOverflow
  w3_setStyle(FContainer.Handle, '-o-text-overflow', 'ellipsis');
  w3_setStyle(FContainer.Handle, 'white-space', 'nowrap'); //use whiteSpace
  w3_setStyle(FContainer.Handle, 'overflow', 'hidden');


I hope in the next hotfix, they have fixed that issue.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...