TextAlign not working in fields

Paul Dupuis paul at researchware.com
Thu Jul 19 16:41:39 CEST 2018


Bernd,

Thank you.

For others following this thread, this fix works!


On 7/18/2018 6:49 PM, Niggemann, Bernd via use-livecode wrote:
> Hi Paul,
>
> I hope that Edinburgh will fix the problem.
>
> In the meantime you could try this workaround for your sample stack from QCC.
>
> make a button with this script and use it whenever you change  textAlign or width of field "Cloud"
>
> Here I assume you are using margins of 8.
>
> -----------------------------------------------
> on mouseUp
>    lock screen
>    set the margins of field "Cloud" to 8
>    set the hScroll of field "Cloud" to 0
>    put the left of field "Cloud" into tLeft
>    put the leftMargin of field "Cloud" into tLeftM
>    put the formattedRect of line 1 to -1 of field "Cloud" into tRect
>    if item 1 of tRect < tLeft + tLeftM then
>       subtract tLeft from item 1 of tRect
>       set the leftMargin of field "Cloud" to item 1 of tRect * -1 + tLeftM * 2
>       set the rightMargin of field "Cloud" to item 1 of tRect
>    end if
>    unlock screen
> end mouseUp
> -----------------------------------------------
>
> I know it sounds weird but it worked for your sample stack.
>
> Kind regards
> Bernd
>
>
> Paul Dupuis wrote:
>
> I filed a bug yesterday: https://quality.livecode.com/show_bug.cgi?id=21426
>
> This seems to me to be a pretty serious bug, however, Panos enlightened
> me that there is a nearly identical bug from 2013 (see
> https://quality.livecode.com/show_bug.cgi?id=11345). This bug - namely
> if you have a long line of text in a field, whether wrap is on or off,
> scrolling does not work as expected when the text is center or right
> aligned. You can not scroll to see all the text. It is rendered outside
> the boundaries of the scrollable areas of the field!
>
> _______________________________________________
> 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