I think I found it:

TEXT TO ARRAY

It splits the text into arrays but I think I can work around it to return
the width of the string.

If I Pass the number of notifications as a string say "738"

I can then set the width of the background rectangle.

http://static1.1.sqspcdn.com/static/f/264519/26425819/1438196524603/unread.jpg?token=Q7Am7EElicWDtAeRUEJSXf432eE%3D

And something like "987.." if the number is too large.





On Fri, Oct 7, 2016 at 4:00 PM, Olivier Deschanels <
[email protected]> wrote:

> Hello,
>
> Perhaps, this command is OBJECT GET BEST SIZE.
>
> Regards,
>
> Olivier
>
> > Le 7 oct. 2016 à 06:25, Sujit Shah <[email protected]> a écrit :
> >
> > I thought (perhaps I was dreaming) 4D has a native command to return the
> > text width in pixels.
> >
> > $Width:=ANice4DCommand ($Text;$FontName;$FontSize;$FontStyle)
> >
> > Is there such "ANice4DCommand"?
> >
> > Why?
> > Because,
> > I am trying to create iOS type notification icons for the toolbar. If
> there
> > are less than 10 notifications is fine but if there are more I want to
> > expand the rounded rectangle.
> >
> >
> >
> > --
> >
> > xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> > "There must be ingenuity as well as intention, strategy as well as
> > strength. "
> > **********************************************************************
> > 4D Internet Users Group (4D iNUG)
> > FAQ:  http://lists.4d.com/faqnug.html
> > Archive:  http://lists.4d.com/archives.html
> > Options: http://lists.4d.com/mailman/options/4d_tech
> > Unsub:  mailto:[email protected]
> > **********************************************************************
>
>
>
>
> Olivier Deschanels
> Consultant Expert
>
> 4D SAS
> 66 route de Sartrouville
> Parc Les Erables - Batiment 4
> 78230 Le Pecq
> France
>
> Standard :  +33 1 30 53 92 00
> Fax :       +33 1 30 53 92 01
> Email :     [email protected]
> Web :       www.4D.com
> AIM :       olivierd4d
> iChat       olivierd4d
> Skype       olivierd4d
>
>
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:[email protected]
> **********************************************************************




-- 

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
"There must be ingenuity as well as intention, strategy as well as
strength. "
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to