Quantcast
Channel: Adobe Community : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 238792

Aligning two textfields

$
0
0

I've got a single line input textfield that the user can type into. I have another dynamic textfield just below aligned to the same x position. The same font and embedding is applied to both.

 

As the user types I want to keep the letters aligned. I'm listening for the CHANGE event and setting the "echo" dynamic field's text property to the input field's text property.

 

No problem if the user types something short. But if they keep typing the text starts to move over to the left to make room for more entry.

 

I thought that I could use the scrollH property of input field to set the scrollH on the echo field. But that doesn't seem to work. It moves the echo along, but it doesn't match up with the input field.

 

And it gets even worse if the user starts deleting. The text doesn't scroll back until you get very close to the left edge. It is odd to get a maxScrollH of 0 and have the scrollH property be 24 or something like that. Isn't that odd; or is it just me?

 

Anybody have any suggestions for how to keep the two texts in synch?


Viewing all articles
Browse latest Browse all 238792

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>