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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 ObjTextAutoSize no effect if ObjText modified at OnNewObject

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
bitfarm Posted - Feb 16 2023 : 09:37:42
Hi,

i would like to use ObjTextAutoSize for setting the size of a new Object.
There are variables that have to be replaced (e.g. %now%). We decided to make the replacement at the OnNewObject Event. Unfortunately the ObjTextAutoSize won't take effect, if ObjText is going to be modified at this point.

Is there any method i could use for triggering the AutoSize or calculating the new width?

kind regards
1   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Feb 16 2023 : 14:07:09
Hi

In this situation you would probably need to use TImageEnVect.OnVectorialChanged to be able to access the size data of the object:

https://www.imageen.com/help/TImageEnVect.OnVectorialChanged.html

You could set a field in OnNewObject to know the change is due to a new object.



Also, if this is a new project, you should use layers rather than objects:

https://www.imageen.com/help/TImageEnVect_vs_TIELayers.html

Nigel
Xequte Software
www.imageen.com