positioning graphics in relation to a line in a text field

Devin Asay devin_asay at byu.edu
Mon Apr 1 16:37:16 EDT 2013


On Apr 1, 2013, at 2:26 PM, Curt Ford wrote:

> My client's project has long text fields, in which are a number of separate lines that, in the original Word files, had boxes around them. The "box" style in LiveCode is too tight around the text for their taste, so I've been creating graphic rectangles and positioning them by hand.
> 
> An issue has come up where wrapping is inconsistent on different systems running XP; when the wrapping changes, the positioning of the graphics over the text is wrong.
> 
> Is there a  way to position the graphics in relation to a given line in a field on the fly?


Curt,

Would the selectedRect of a text chunk do what you want? I could imagine locking the screen, getting the selectedRect, drawing the box based on that, then unlocking the screen.

Devin


Devin Asay
Office of Digital Humanities
Brigham Young University





More information about the use-livecode mailing list