Hello Fredvs;

     I think there is  a problem to get the length of a caption.

     would you like to try this small demo  ( as Attn)

Best Regards

Med.

________________________________
De : fredvs <[email protected]>
Envoyé : mardi 6 août 2019 19:00
À : [email protected] 
<[email protected]>
Objet : Re: [MSEide-MSEgui-talk] Fonts

Hello Med.

As work around, I would do this:

- Add a ATLabel somewhere,  set to autosize = true and visible = false.

When you need to know the width of a character:

ATlabel.font := theObject.frame.font;
ATlabel.font.height := theObject.frame.font.height;
ATlabel.font.width := theObject.frame.font.width;
ATlabel.caption := '-';

width_of_char := ATlabel.width ;  ----> here the width you want.

Fre;D



--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/


_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Attachment: np.rar
Description: np.rar

_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to