Re: positioning graphics in relation to a line in a text field

2013-04-02 Thread Mark Wieder
Thomas McGrath III writes: > put the formattedRect of the selectedChunk into tRect Thanks for the pointer to formattedRect. As long as you can specify the chunk this works great (minus the scrolling complications). -- Mark Wieder mwie...@ahsoftware.net ___

Re: positioning graphics in relation to a line in a text field

2013-04-02 Thread Mark Wieder
Mark Wieder writes: > you have to catch all the scrollbar events: scrollbarDrag, > scrollbarLineInc, scrollbarLineDec, scrollbarPageInc, scrollbarPageDec Ack! Correcting myself... scrollbarDrag handles all those messages as long as there aren't other handlers for them. -- Mark Wieder mwie...

Re: positioning graphics in relation to a line in a text field

2013-04-02 Thread Michael Doub
Thanks Mark and Tom for your advice. The original question was how to create a graphic around some selected text. I think that has be answered. I diverted the thread a bit to almost the opposite. I want to have two graphics (one at the beginning and one at the end of the selected text) con

Re: positioning graphics in relation to a line in a text field

2013-04-02 Thread Mark Wieder
oh... and don't forget to copy the graphic at the borders of the field. ___ 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/mailma

Re: positioning graphics in relation to a line in a text field

2013-04-02 Thread Mark Wieder
Michael Doub writes: > Thanks Tom. Mark, what are some of the complications Don't know about iOS, maybe there are other things to take care of, but in general you have to catch all the scrollbar events: scrollbarDrag, scrollbarLineInc, scrollbarLineDec, scrollbarPageInc, scrollbarPageDec, and c

Re: positioning graphics in relation to a line in a text field

2013-04-02 Thread Peter Haworth
Ok, thanks stephen, as I said I missed the beginning of this thread. Pete lcSQL Software On Tue, Apr 2, 2013 at 11:46 AM, stephen barncard < stephenrevoluti...@barncard.com> wrote: > imagesource replaces a text character with a graphic. > > The OP wanted a square with tran

Re: positioning graphics in relation to a line in a text field

2013-04-02 Thread stephen barncard
imagesource replaces a text character with a graphic. The OP wanted a square with transparency to surround a word or phrase in a text field that looks better than the built in function. On Tue, Apr 2, 2013 at 11:43 AM, Peter Haworth wrote: > Michael, > I missed the beginning of this thread so

Re: positioning graphics in relation to a line in a text field

2013-04-02 Thread Peter Haworth
Michael, I missed the beginning of this thread so not 100% sure of what you're trying to achieve but have you considered - set the imagesource of char x of line y of field "xyz" to 1234? That makes the image appear at the specified location and it scrolls along with everything else. You may also

Re: positioning graphics in relation to a line in a text field

2013-04-02 Thread Michael Doub
Thanks Tom. Mark, what are some of the complications that you mentioned about scrolling fields? I am thinking about trying to emulate the little IOS selection handles. I can see going from the selection to find a location to put the pin graphic, but I am not quite sure how to modify the sel

Re: positioning graphics in relation to a line in a text field

2013-04-02 Thread Thomas McGrath III
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

Re: positioning graphics in relation to a line in a text field

2013-04-02 Thread Michael Doub
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 wrote: > Michael- > > Tuesday, April 2, 2013, 6:52:57 AM, you wrote: > >> I must be missing something. selectedLoc gets

Re: positioning graphics in relation to a line in a text field

2013-04-02 Thread Devin Asay
On Apr 2, 2013, at 7:52 AM, Michael Doub 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? [Slaps forehead.] Now I remember what I was trying to remember in my first

Re: positioning graphics in relation to a line in a text field

2013-04-02 Thread Mark Wieder
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 Wied

Re: positioning graphics in relation to a line in a text field

2013-04-02 Thread Michael Doub
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? -= Mike On Apr 1, 2013, at 4:57 PM, Richard Gaskin wrote: > Curt Ford wrote: > >> My client's project has long text fields, i

Re: positioning graphics in relation to a line in a text field

2013-04-01 Thread Geoff Canyon
On Mon, Apr 1, 2013 at 5:31 PM, Mark Wieder wrote: > Don't forget to adjust for scrolling as well. > And it gets slightly more complicated if you select multiple lines. > To simplify this I'd use a non-scrolling text field in a scrolling group with the field (sized to fit all the content) and r

Re: positioning graphics in relation to a line in a text field

2013-04-01 Thread Mark Wieder
Curt Ford writes: > > Ah, this is getting me pretty close: > >select line 3 of fld "Field2" >set the left of graphic "Rectangle" to item 1 of the selectedLoc - 10 >set the top of graphic "Rectangle" to item 2 of the selectedLoc - 10 >select empty > > And checking the formattedH

re: positioning graphics in relation to a line in a text field

2013-04-01 Thread Curt Ford
Ah, this is getting me pretty close: select line 3 of fld "Field2" set the left of graphic "Rectangle" to item 1 of the selectedLoc - 10 set the top of graphic "Rectangle" to item 2 of the selectedLoc - 10 select empty And checking the formattedHeight of the selectedLine will let me a

Re: positioning graphics in relation to a line in a text field

2013-04-01 Thread Devin Asay
On Apr 1, 2013, at 2:47 PM, Mark Wieder wrote: > Devin Asay writes: > >> Would the selectedRect of a text chunk do what you want? > > Yeah, wouldn't that be nice? > Is there an enhancement request for this? Right now it's a bit of a > complicated > algorithm, and requires a fixed line height

Re: positioning graphics in relation to a line in a text field

2013-04-01 Thread Richard Gaskin
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 b

Re: positioning graphics in relation to a line in a text field

2013-04-01 Thread Mark Wieder
Devin Asay writes: > Would the selectedRect of a text chunk do what you want? Yeah, wouldn't that be nice? Is there an enhancement request for this? Right now it's a bit of a complicated algorithm, and requires a fixed line height in a field. -- Mark Wieder mwie...@ahsoftware.net ___

Re: positioning graphics in relation to a line in a text field

2013-04-01 Thread Devin Asay
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

positioning graphics in relation to a line in a text field

2013-04-01 Thread Curt Ford
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 ha