Getting textShift To Shift Down?

Terry Judd terry.judd at unimelb.edu.au
Thu Jan 14 21:42:18 EST 2016


Looks like the script got slightly munged en route. That should be “if y >
0 then” a few lines down.

Terry...

On 15/01/2016 1:21 pm, "use-livecode on behalf of Terry Judd"
<use-livecode-bounces at lists.runrev.com on behalf of
terry.judd at unimelb.edu.au> wrote:

>Hi Scott - I think you might be able to do something by manipulating the
>margins of the field as well as the textShift.
>
>I did a test with 2 basic fields - one containing the text and the other
>the value I wanted to adjust the textshift by...
>
>Contents of fld 1
>
>word1 word2 word3
>word1 word2 word3
>
>word1 word2 word3
>
>
>Script of fld 2
>
>on returnInField
>  lock screen
>  put me into y
>  if (pMargins is empty) or  (y<0)  then put "8,8,0,0" into pMargins #
>default margins
>  put pMargins into tMargins
>  set the textShift of word 2 of line 3 of fld 1 to y
>  if y „ 0 then
>    add y to item 2 of tMargins
>  end if
>  set the margins of fld 1 to tMargins
>  unlock screen
>end returnInField
>
>Šmy test was pretty basic but it seemed to work under these conditions.
>
>Regards,
>
>Terry...
>
>
>
>On 15/01/2016 11:41 am, "use-livecode on behalf of Scott Rossi"
><use-livecode-bounces at lists.runrev.com on behalf of
>scott at tactilemedia.com> wrote:
>
>>Thanks Bernd, but if I understand what you're suggesting, I've already
>>tried this and it doesn't appear to work.  Using different textShift
>>values for the selected text and surrounding text just seems to average
>>out, always moving text upward, never downward.
>>
>>Regards,
>>
>>Scott Rossi
>>Creative Director
>>Tactile Media, UX/UI Design
>>
>>
>>
>>
>>On 1/14/16, 4:04 PM, "use-livecode on behalf of BNig"
>><use-livecode-bounces at lists.runrev.com on behalf of
>>bernd.niggemann at uni-wh.de> wrote:
>>
>>>Hi Scott,
>>>
>>>the following works for me in 7.0.6
>>>
>>>textSize 14, textheight 28, fixed lineHeight
>>>
>>>e.g. 
>>>
>>>-----
>>>set the textShift of char 1 to - 1 of field 1 to -9
>>>-----
>>>
>>>then a slider with values from - 9 to - 3
>>>
>>>----
>>>on scrollbarDrag pValue
>>>   set the textShift of word 2 of line 1 of field 1 to pValue
>>>end scrollbarDrag
>>>----
>>>
>>>this pushes word 2 of line 1 of field 1 down. If I use values above - 3,
>>>e.g. -2 or 0 then it pushes the text up again.
>>>
>>>Maybe this is an option to set the textshift of the whole text to a
>>>negative
>>>number and then move down the text by setting it to another negative
>>>number
>>>but not as high as the whole text.
>>>
>>>Kind regards
>>>Bernd
>>>
>>>
>>>
>>>--
>>>View this message in context:
>>>http://runtime-revolution.278305.n4.nabble.com/Getting-textShift-To-Shif
>>>t
>>>-
>>>Down-tp4700184p4700193.html
>>>Sent from the Revolution - User mailing list archive at Nabble.com.
>>>
>>>_______________________________________________
>>>use-livecode mailing list
>>>use-livecode at 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 at 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 at lists.runrev.com
>Please visit this url to subscribe, unsubscribe and manage your
>subscription preferences:
>http://lists.runrev.com/mailman/listinfo/use-livecode



More information about the use-livecode mailing list