Announcement

Collapse
No announcement yet.

How do I determine position of text in input field?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How do I determine position of text in input field?

    Hello,

    I'm creating a customized search input field that takes text on the left side and search tags on the right:



    I want to limit the text to whatever will fit into the left side such that the user cannot type into the space occupied by the tags. For example, in the image above, the user can type:

    "This is some text. This is more text. Man, there's a lot of text here. Just look"

    before hitting the left-most tag "MECXXX". At that point, I want to prevent the user from typing anymore.

    But if the user gets rid of the "MECXXX" tag, he should be able to type some more:

    "This is some text. This is more text. Man, there's a lot of text here. Just look at all this text"



    I can figure out the position of the left edge of the left-most tag, but how do I figure out the position of the right edge of the text?
Working...
X