ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 TIELineLayer LabelText
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

c.basso

Italy
36 Posts

Posted - May 21 2020 :  05:52:45  Show Profile  Reply
Hi,
I'm setting the LabelText for a line layer:
TIELineLayer(Layers[idx1]).LabelText:= 'My label text'
TIELineLayer(Layers[idx1]).LabelPosition:= ielpAbove;
TIELineLayer(Layers[idx1]).TextOverflow:= ieoShrink;
ImageEnView.Update;

But after that,
only the first part of label is shown (ex. "My la"),
the text appear truncated.
I've tryed to use lockupdate/unlockupdate lockpaint/unlockpaint,
but always same issue,
i'm unable to set a label text with more that 5-6 characters.

If I add some fake text suffix, example
TIELineLayer(Layers[idx1]).LabelText:= 'My label text' + '. .'

The first part ('My label text') is shown.



Claudio

xequte

38616 Posts

Posted - May 21 2020 :  22:29:49  Show Profile  Reply
Hi Claudio

Is this in 9.0.0? I cannot reproduce that using the following, can you give me more information?


ImageEnView1.LayersAdd( Point( 100, 100), Point( 200, 200 ));
TIELineLayer(ImageEnView1.CurrentLayer).LabelText:= 'My label text';
TIELineLayer(ImageEnView1.CurrentLayer).LabelPosition:= ielpAbove;
TIELineLayer(ImageEnView1.CurrentLayer).TextOverflow:= ieoShrink;
TIELineLayer(ImageEnView1.CurrentLayer).LabelFont.Size := 30;
ImageEnView1.Update;


Nigel
Xequte Software
www.imageen.com
Go to Top of Page

c.basso

Italy
36 Posts

Posted - May 22 2020 :  03:02:31  Show Profile  Reply
Hi,
yes, I'm using latest version,
try with an inclined line,
with horiz or vert line it's ok.
I think that the problem is that the label goes wordwrap,
and text is not resized to fit.

See screenshot here: https://file.io/qpCaSKRa

Claudio
Go to Top of Page

xequte

38616 Posts

Posted - Jun 01 2020 :  00:26:51  Show Profile  Reply
Sorry, I cannot reproduce that. Do you see it in any of our demos? If so, please give me the exact steps to take.



Nigel
Xequte Software
www.imageen.com
Go to Top of Page

c.basso

Italy
36 Posts

Posted - Jun 04 2020 :  04:38:54  Show Profile  Reply
Hi,
I've made a lot of tests,
finally I've find the way to reproduce.
The trick is the zoom. If you set zoom to 50%, and you resize a LineLayer, label is not resized correctly.

Here a sample project (https://easyupload.io/daxvog).
1. Create a line layer
2. Set zoom to 50%
3. Resize line layer



Claudio
Go to Top of Page

xequte

38616 Posts

Posted - Jun 05 2020 :  02:45:07  Show Profile  Reply
Sorry Claudio, I missed that earlier. I have found the issue. Please email me for a fixed version.


Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: