Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

tablelist: center vertical alignment of multi-line cell data

27 views
Skip to first unread message

Harald Oehlmann

unread,
Feb 2, 2024, 12:45:06 PMFeb 2
to
Thanks for incredible tablelist!
Please look to the following example:

package require tablelist_tile
pack [tablelist::tablelist .t -columns {2 1 2 2 2 3}]
.t insert end [list A\nB\nC X A\nB\nC\nD\nE]

The result is as follows:

1|2|3
-+-+-
A| |A
B| |B
C|X|C
| |D
| |E

If a text is multi line, it is vertically aligned to the top, like in
column 1 and 3.
If a text is single line, it is vertically aligned in the center, like
in column 2.

May I ask how to vertically align all cells in the center?

So, what I would love to see is:

1|2|3
-+-+-
| |A
A| |B
B|X|C
C| |D
| |E

I am probably blind and dump. I only found the -valign option, but this
is for embedded windows or pictures and worked well.

Any hint appreciated !

Thank you and take care,
Harald

nemethi

unread,
Feb 3, 2024, 8:29:25 AMFeb 3
to
Am 02.02.24 um 18:45 schrieb Harald Oehlmann:
Neither blind nor dumb. :-) The message windows that display multi-line
elements are created with "-align top". For this reason, currently
there is no way to get what you would like to see. :-)

Actually, the decision to use "-align top" for the message windows that
display multi-line elements turns out to have been a bad idea. The
default vertical alignment "center" would have the benefit that not only
the single-line cell texts within an item but also the multi-line ones
would appear vertically centered, thus giving rise to a uniform and more
logical look. Inspired by your posting, in the next Tablelist version
these message windows will be created with the default "-align center"
setting.

I have already made the necessary changes, hence I can send you a
preliminary release if you are interested. I am planning to release the
next Tablelist version 7.1 within the next few weeks.

--
Csaba Nemethi https://www.nemethi.de mailto:csaba....@t-online.de

Harald Oehlmann

unread,
Feb 3, 2024, 11:50:07 AMFeb 3
to
Top work, Csaba, as usual. I am ready to test a beta, if you like.
My original application has Chinese and English characters, so it really
looks funny.

Thanks again and take care,
Harald
0 new messages