Textbox width according to the characters present in the textbox.
26 views
Skip to first unread message
P
unread,
Dec 17, 2013, 1:35:11 AM12/17/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-we...@googlegroups.com
Hi,
I need to set the size of the text box according to the length of the text inside that box, it may contain localized characters like Chinese. Is any we can calculate the length in pixels for this?
Thank you,
Parag
Andrei
unread,
Dec 17, 2013, 8:40:04 AM12/17/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-we...@googlegroups.com
You can only approximate.
(1) Users may not have a specified font. Browsers will try to substitute this font, and the width of characters maybe different for a substitute font.
(2) Users can zoom in or out, changing the font size from the one you set.