[Gambas-user] Text-Wrapping
Benoît Minisini
g4mba5 at gmail.com
Wed Nov 11 20:13:31 CET 2020
Le 11/11/2020 à 19:32, Bruce a écrit :
>
> Unfortunately, my "perfext code is in python and consists of a single
> call to textwrap.wrap() See here for more info
> https://docs.python.org/3/library/textwrap.html#textwrap.wrap
>
> I was merely trying to point out that it isn't as simple as it looks.
>
>>> I had understood, obviously badly as I usually do, that each line of
>>> text
>>> should contain the maximum possible number of characters indicated (with
> That is a fair and alternate interpretation of the question and one I
> should have put in my original post!
>
> Perhaps having a look at how the IDE wraps code might be an idea? It
> seems to do quite well with (silly) things like:
> Dim MyName As String = "Mr. Michael Sean O'Reilly-Dogherty III (Jnr)"
>
> cheers
> b
>
The text editor wrapping algorithm is for proportional fonts and is
based on pixels, not on characters.
--
Benoît Minisini
More information about the User
mailing list