Jump to content

Adding Ellipses (...) to TUniLabel.Text If Insufficient Space


mos

Recommended Posts

Hi Delphi Developer,

 

  I have decided to use a different JQuery plugin https://www.jqueryscript.net/text/Versatile-Responsive-Text-Truncation-Plugin-For-jQuery-Truncate-js.html

 

 As the output from this one was exactly what I wanted.

 

 I changed the code you gave me above to:

UniLabel1.JSInterface.JSCode('Ext.defer(function(){$($("#"+'#1'.id)[0]).truncate({lines:2})},50);');

 However this didn't work.

 

Can you see why the above code doesn't work for the new plugin?

Link to comment
Share on other sites

Hi,

 

 I changed the code you gave me above to:

UniLabel1.JSInterface.JSCode('Ext.defer(function(){$($("#"+'#1'.id)[0]).truncate({lines:2})},50);');

 However this didn't work.

 

This code uses the Ext.defer function,
try to increase the value 50 to 100, 200, 300...

Link to comment
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.

Guest
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...