TextAlign not working in fields

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

TextAlign not working in fields

Clarence Martin via use-livecode
LC Community:

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!

This bug has apparently been present since at least version 6.7.11 and
perhaps earlier and yet is still present in LiveCode 9.

Without starting a general thread on how good or not good LiveCode is at
fixing bugs (personally I think they do a fine job with limited
resources), I am asking whether others have run into these bugs and what
you may have done for a work-around?

In my specific case, we are creating a "frequency" cloud (or work cloud)
where certain words/phrases are shown in larger text relative to how
offten they occur. This looks best when the text is one long lone,
wrapped and centered. If you look at the sample stack for bug 21426 with
the text centered (there is a button for that) and resize large so all
the text fits, you'll see what it (should) look like.

Does any one else need this bug fixed?



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: TextAlign not working in fields

Clarence Martin via use-livecode
Hi.

I made a field with lots of long lines of text in it. I set the align all
over the place. Both vertical and horizontal scrolling seem to work smoothly
all the way from beginning to end.

I read the bug report. Can you give an explicit recipe?

Mac OS 10.13  LC 8.1.9

Craig Newman



--
Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: TextAlign not working in fields

Clarence Martin via use-livecode
i tested the sample stack and it seemed to work fine in 9 ...alignment
worked as expected. win 10 / lc 9.0... hope it gets fixed soon seems like a
major one for some people.

On Wed, Jul 18, 2018 at 2:13 PM, dunbarxx via use-livecode <
[hidden email]> wrote:

> Hi.
>
> I made a field with lots of long lines of text in it. I set the align all
> over the place. Both vertical and horizontal scrolling seem to work
> smoothly
> all the way from beginning to end.
>
> I read the bug report. Can you give an explicit recipe?
>
> Mac OS 10.13  LC 8.1.9
>
> Craig Newman
>
>
>
> --
> Sent from: http://runtime-revolution.278305.n4.nabble.com/
> Revolution-User-f278306.html
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: TextAlign not working in fields

Clarence Martin via use-livecode
In reply to this post by Clarence Martin via use-livecode
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
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: TextAlign not working in fields

Clarence Martin via use-livecode
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
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode