--- In [email protected], "andyx77" <sng.al...@...> wrote: > > Hi > > Does anyone know if it's possible to determine the width of a text string at > a given font size (similar to VB's TextWidth function)? > > Andrew >
I have not been following all of this conversation, so maybe something like this has been suggested already, or doesn't meet your requirements, or I have totally missed the question, but here it is my possible solution: option explicit dim txt txt="This is a test" addobject "picturebox", "pb" 0,0,200,200 '0,0,0,0 to not display dim i for i=7 to 10 pb.fontsize=i pb.drawtext i & "-" & pb.textwidth(txt) & "-" & txt next pb.fontbold=true for i=7 to 10 pb.fontsize=i pb.drawtext i & "-" & pb.textwidth(txt) & "-" & txt next Jim --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nsb-ce" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nsb-ce?hl=en -~----------~----~----~----~------~----~------~--~---
