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
 How to adjust font size on the line ruler?

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
klinikaxp Posted - Oct 26 2020 : 03:56:42
I create a line with ruler to measure distance (I set: IE.MouseInteractGeneral := [miMeasureLength]). The font is automatically adjusted: when the line is short, the font is small. When user moves then mouse and the line becomes longer, the font is increased. It is very useful. But the line disappears after MouseUp event.

I want to leave the line, so I create it this way:
IE.MouseInteractGeneral := [];
IE.MouseInteractLayers := [mlClickCreateLineLayers];

and OnNewLayer I specify:
TIELineLayer (ImageVect.CurrentLayer).IsRuler := True;
TIELineLayer (ImageVect.CurrentLayer).LabelFont.Size := 40;
TIELineLayer (ImageVect.CurrentLayer).LabelFillColor := clNone;
TIELineLayer (ImageVect.CurrentLayer).LabelPosition := ielpAutoAbove;
TIELineLayer (ImageVect.CurrentLayer).LabelFont.Size := RULER_FONT_SIZE;

And now I have got two questions:
1. How can I modify LabelFont size according to line length? I tried to set it using OnMeasure, OnMouseMove events, but it was not working well.

2. Is it possible to ignore units in Ruler Text? All measurement is made in mm, so I would like to display on the ruler only "12.34" instead of "12.34 mm". Can I configure something to reduce it?


2   L A T E S T    R E P L I E S    (Newest First)
klinikaxp Posted - Oct 26 2020 : 17:07:44
It was exactly what I was looking for! Thank you!
xequte Posted - Oct 26 2020 : 15:52:15
Hi

1. Autoshrinking of large text is handled by the TextOverflow property:

https://www.imageen.com/help/TIELineLayer.TextOverflow.html


2. There is not an event to customize the text for when IsRuler=True. You could turn off IsRuler and set the text value yourself (e.g. when the layer is sized) using the value of:

https://www.imageen.com/help/TIELineLayer.RulerValue.html

Nigel
Xequte Software
www.imageen.com