This works really well for me and it will handle multiple selected word on different lines etc. I had a grc that was a dashed box:
on mouseUp put the formattedRect of the selectedChunk into tRect put "4" into tMargin put item 1 of tRect - tMargin into item 1 of tRect put item 3 of tRect + tMargin + 3 into item 3 of tRect put item 4 of tRect + tMargin into item 4 of tRect set the rect of graphic "Box" to tRect end mouseUp -- Tom McGrath III http://lazyriver.on-rev.com mcgra...@mac.com On Apr 2, 2013, at 11:24 AM, Michael Doub <miked...@gmail.com> wrote: > Thanks Mark. I think it is going to be one of those days that I might as > well stop looking for the forest or the trees. > > -= Mike > > > On Apr 2, 2013, at 11:01 AM, Mark Wieder <mwie...@ahsoftware.net> wrote: > >> Michael- >> >> Tuesday, April 2, 2013, 6:52:57 AM, you wrote: >> >>> I must be missing something. selectedLoc gets you the upper left >>> corner. FormattedHeight will allow computation of the lowerLeft. >>> How do you get the right side? >> >> The formattedWidth of the longest line plus the left. >> >> -- >> -Mark Wieder >> mwie...@ahsoftware.net >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode@lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription >> preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > > > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode