Re: Y coordinate for a line of text
> I’m needing to know the coordinate (Y is the tricky one) for a line of text... the selectedLoc if you need the rectangle use additionally measureText or measureUnicodeText ___ 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
Re: Y coordinate for a line of text
I misStated this completely. The point being that no property of the field itself should be a factor at all, not its loc or rect, for example. Only the Y value of the selectedLine is pertinent. Glad you have what you need, but I still do not see the value of the selectedLoc. This depends on the loc of the field, and otherwise has no relationship to the field itself, that is, the Y coordinate within that field. Craig -Original Message- From: Mark Wieder via use-livecode To: dunbarx--- via use-livecode Cc: Mark Wieder Sent: Wed, Nov 13, 2019 11:20 am Subject: Re: Y coordinate for a line of text On 11/13/19 8:11 AM, dunbarx--- via use-livecode wrote: > The selectedLoc will give the loc in window coordinates, not the "local" Y > coordinate within the field of interest, which is what I thought you wanted. > I cannot imagine what value that would have, since it depends on where the > stack window is currently placed. localLoc() -- Mark Wieder ahsoftw...@gmail.com ___ 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
Re: Y coordinate for a line of text
On 11/13/19 10:11 AM, dunbarx--- via use-livecode wrote: The selectedLoc will give the loc in window coordinates, not the "local" Y coordinate within the field of interest, which is what I thought you wanted. I cannot imagine what value that would have, since it depends on where the stack window is currently placed. Craig SelectedLoc uses local (card) coordinates, not screen coordinates. It does not give coordinates relative to the field itself though, as you said. It doesn't matter where the stack is placed on screen since the coordinates are based on the topleft of the card. I've used it for aligning other controls, like a semi-transparent field to simulate "dragging" a line of text. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ 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
Re: Y coordinate for a line of text
Mark, Yep, that will do the translation. But I am no longer sure what the OP originally wanted. OP? Craig -Original Message- From: Mark Wieder via use-livecode To: dunbarx--- via use-livecode Cc: Mark Wieder Sent: Wed, Nov 13, 2019 11:20 am Subject: Re: Y coordinate for a line of text On 11/13/19 8:11 AM, dunbarx--- via use-livecode wrote: > The selectedLoc will give the loc in window coordinates, not the "local" Y > coordinate within the field of interest, which is what I thought you wanted. > I cannot imagine what value that would have, since it depends on where the > stack window is currently placed. localLoc() -- Mark Wieder ahsoftw...@gmail.com ___ 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
Re: Y coordinate for a line of text
On 11/13/19 8:11 AM, dunbarx--- via use-livecode wrote: The selectedLoc will give the loc in window coordinates, not the "local" Y coordinate within the field of interest, which is what I thought you wanted. I cannot imagine what value that would have, since it depends on where the stack window is currently placed. localLoc() -- Mark Wieder ahsoftw...@gmail.com ___ 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
Re: Y coordinate for a line of text
The selectedLoc will give the loc in window coordinates, not the "local" Y coordinate within the field of interest, which is what I thought you wanted. I cannot imagine what value that would have, since it depends on where the stack window is currently placed. Craig -Original Message- From: scott--- via use-livecode To: How to use LiveCode Cc: sc...@elementarysoftware.com Sent: Tue, Nov 12, 2019 10:12 pm Subject: Re: Y coordinate for a line of text Thank you Craig and Paul. Your answers were what I was hoping for. Devin, it turned out that selectedLoc() was the easiest to implement. How did I not know about that function! Thanks! Scott Morrow Elementary Software (Now with 20% less chalk dust!) web https://elementarysoftware.com/ email sc...@elementarysoftware.com booth 1-800-615-0867 -- > On Nov 12, 2019, at 8:46 AM, Devin Asay via use-livecode > wrote: > > The selectedLoc function may also be helpful. > > >> On Nov 12, 2019, at 7:27 AM, Paul Dupuis via use-livecode >> wrote: >> >> You may want to look at the Dictionary entry for "measureText" >> >> >> On 11/12/2019 1:43 AM, scott--- via use-livecode wrote: >>> I’m needing to know the coordinate (Y is the tricky one) for a line of >>> text. I’m not do a very good job at calculating it. I think I remember a >>> newish LC command or function that achieved this but I can’t locate it in >>> the dictionary. Am I imagining? >>> >>> -- >>> Scott Morrow >>> >>> Elementary Software >>> (Now with 20% less chalk dust!) >>> web https://elementarysoftware.com/ >>> email sc...@elementarysoftware.com >>> booth 1-800-615-0867 >>> >>> -- >>> >>> >>> >>> >>> >>> >>> >>> >>> ___ >>> 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 > > Devin Asay > Director > Office of Digital Humanities > Brigham Young University > > ___ > 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
Re: Y coordinate for a line of text
Thank you Craig and Paul. Your answers were what I was hoping for. Devin, it turned out that selectedLoc() was the easiest to implement. How did I not know about that function! Thanks! Scott Morrow Elementary Software (Now with 20% less chalk dust!) web https://elementarysoftware.com/ email sc...@elementarysoftware.com booth1-800-615-0867 -- > On Nov 12, 2019, at 8:46 AM, Devin Asay via use-livecode > wrote: > > The selectedLoc function may also be helpful. > > >> On Nov 12, 2019, at 7:27 AM, Paul Dupuis via use-livecode >> wrote: >> >> You may want to look at the Dictionary entry for "measureText" >> >> >> On 11/12/2019 1:43 AM, scott--- via use-livecode wrote: >>> I’m needing to know the coordinate (Y is the tricky one) for a line of >>> text. I’m not do a very good job at calculating it. I think I remember a >>> newish LC command or function that achieved this but I can’t locate it in >>> the dictionary. Am I imagining? >>> >>> -- >>> Scott Morrow >>> >>> Elementary Software >>> (Now with 20% less chalk dust!) >>> web https://elementarysoftware.com/ >>> email sc...@elementarysoftware.com >>> booth1-800-615-0867 >>> >>> -- >>> >>> >>> >>> >>> >>> >>> >>> >>> ___ >>> 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 > > Devin Asay > Director > Office of Digital Humanities > Brigham Young University > > ___ > 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
Re: Y coordinate for a line of text
The selectedLoc function may also be helpful. > On Nov 12, 2019, at 7:27 AM, Paul Dupuis via use-livecode > wrote: > > You may want to look at the Dictionary entry for "measureText" > > > On 11/12/2019 1:43 AM, scott--- via use-livecode wrote: >> I’m needing to know the coordinate (Y is the tricky one) for a line of text. >> I’m not do a very good job at calculating it. I think I remember a newish LC >> command or function that achieved this but I can’t locate it in the >> dictionary. Am I imagining? >> >> -- >> Scott Morrow >> >> Elementary Software >> (Now with 20% less chalk dust!) >> web https://elementarysoftware.com/ >> email sc...@elementarysoftware.com >> booth1-800-615-0867 >> >> -- >> >> >> >> >> >> >> >> >> ___ >> 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 Devin Asay Director Office of Digital Humanities Brigham Young University ___ 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
Re: Y coordinate for a line of text
You may want to look at the Dictionary entry for "measureText" On 11/12/2019 1:43 AM, scott--- via use-livecode wrote: I’m needing to know the coordinate (Y is the tricky one) for a line of text. I’m not do a very good job at calculating it. I think I remember a newish LC command or function that achieved this but I can’t locate it in the dictionary. Am I imagining? -- Scott Morrow Elementary Software (Now with 20% less chalk dust!) web https://elementarysoftware.com/ email sc...@elementarysoftware.com booth1-800-615-0867 -- ___ 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
Re: Y coordinate for a line of text
How do I format a simple handler so that it is not strung out like a 1960's hippie? Why is there no forum-like area to post scripts? Is this because I am using AOL as a portal to the use list? Craig -Original Message- From: dunbarx--- via use-livecode To: use-livecode Cc: dunbarx Sent: Tue, Nov 12, 2019 9:05 am Subject: Re: Y coordinate for a line of text Hi. Assuming you have a field 1 with several lines of text in it, and have set the textHeight of that field, then in a button script somewhere; on mouseUpanswer the textHeight of fld 1 * lineOffset(yourText,fld 1) + the top of fld 1end mouseUp Craig -Original Message- From: scott--- via use-livecode To: How to use LiveCode Cc: sc...@elementarysoftware.com Sent: Tue, Nov 12, 2019 1:45 am Subject: Y coordinate for a line of text I’m needing to know the coordinate (Y is the tricky one) for a line of text. I’m not do a very good job at calculating it. I think I remember a newish LC command or function that achieved this but I can’t locate it in the dictionary. Am I imagining? -- Scott Morrow Elementary Software (Now with 20% less chalk dust!) web https://elementarysoftware.com/ email sc...@elementarysoftware.com booth 1-800-615-0867 -- ___ 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
Re: Y coordinate for a line of text
Hi. Assuming you have a field 1 with several lines of text in it, and have set the textHeight of that field, then in a button script somewhere; on mouseUpanswer the textHeight of fld 1 * lineOffset(yourText,fld 1) + the top of fld 1end mouseUp Craig -Original Message- From: scott--- via use-livecode To: How to use LiveCode Cc: sc...@elementarysoftware.com Sent: Tue, Nov 12, 2019 1:45 am Subject: Y coordinate for a line of text I’m needing to know the coordinate (Y is the tricky one) for a line of text. I’m not do a very good job at calculating it. I think I remember a newish LC command or function that achieved this but I can’t locate it in the dictionary. Am I imagining? -- Scott Morrow Elementary Software (Now with 20% less chalk dust!) web https://elementarysoftware.com/ email sc...@elementarysoftware.com booth 1-800-615-0867 -- ___ 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
Y coordinate for a line of text
I’m needing to know the coordinate (Y is the tricky one) for a line of text. I’m not do a very good job at calculating it. I think I remember a newish LC command or function that achieved this but I can’t locate it in the dictionary. Am I imagining? -- Scott Morrow Elementary Software (Now with 20% less chalk dust!) web https://elementarysoftware.com/ email sc...@elementarysoftware.com booth1-800-615-0867 -- ___ 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