[Gambas-user] Text-Wrapping
Brian G
brian at westwoodsvcs.com
Wed Nov 11 20:25:58 CET 2020
Sorry Forgot to include the formatted output:
Stately, plump Buck Mulligan came from the stairhead, bearing
a bowl of lather on which a mirror and a razor lay crossed. A
yellow dressinggown, ungirdled, was sustained gently behind him
on the mild morning air. He held the bowl aloft and intoned:
"Introibo ad altare Dei."
Halted, he peered down the dark winding stairs and called out
coarsely:
"Come up, Kinch! Come up, you fearful jesuit!"
Solemnly he came forward and mounted the round gunrest. He fac-
ed about and blessed gravely thrice the tower, the surrounding
land and the awaking mountains. Then, catching sight of Stephen
Dedalus, he bent towards him and made rapid crosses in the air,
gurgling in his throat and shaking his head. Stephen Dedalus,
displeased and sleepy, leaned his arms on the top of the stair-
case and looked coldly at the shaking gurgling face that bless-
ed him, equine in its length, and at the light untonsured hair,
grained and hued like pale oak.
Buck Mulligan peeped an instant under the mirror and then cove-
red the bowl smartly.
"Back to barracks! he said sternly."
Thank You
Brian G
----- Original Message -----
From: "Brian" <brian at westwoodsvcs.com>
To: "Gambas mailing list" <user at lists.gambas-basic.org>
Sent: Wednesday, November 11, 2020 11:20:34 AM
Subject: Re: [Gambas-user] Text-Wrapping
Here is a simple text wrap, I had.
Thank You
Brian G
----- Original Message -----
From: "Benoît Minisini" <g4mba5 at gmail.com>
To: "Gambas mailing list" <user at lists.gambas-basic.org>
Sent: Wednesday, November 11, 2020 11:13:31 AM
Subject: Re: [Gambas-user] Text-Wrapping
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
----[ http://gambaswiki.org/wiki/doc/netiquette ]----
More information about the User
mailing list