slingsla
Newbie FD

Posts: 1
|
 |
« on: 10 Mar 2010, 20:58:10 UTC » |
|
I'm trying to create a custom component extending textArea in which each individual line in the textArea would have different start and end points. For example, the start/end points for line 1 might be 20 pixels in the front and 35 pixels at the end but start/end points for line 2 might be 25 pixels in front and 20 pixels at the end, etc. These boundary values would be passed in. The width of the entire textArea component would be a fixed size. The result would be something like this:
Jack and Jill ran up the hill to fetch a pail of water
depending on the boundary values of each individual line of course. The custom component would take a string and render it in the text component with the appropriate individual line start and end points. I'm trying to do this by adding the text component to the display with the passed in string and then adding in spaces in the beginning of each line and adding a "/n" at the end of the line wherever appropriate based on the start and end values for that line. This would then involve a custom wordwrap when placing the "/n". An issue I've encountered already is having to reupdate the display after each adjustment (adding in spaces or a /n) in order to make the subsequent adjustments. I'm not sure what the best way to do this is.
I'm wondering if I'm on the right track and if anyone has any advice on this, especially if I'm missing an easier way of going about this. Thank you
|