• tablelist: center vertical alignment of multi-line cell data

    From Harald Oehlmann@21:1/5 to All on Fri Feb 2 18:45:01 2024
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From nemethi@21:1/5 to All on Sat Feb 3 14:29:19 2024
    Am 02.02.24 um 18:45 schrieb Harald Oehlmann:
    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

    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:[email protected]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Harald Oehlmann@21:1/5 to All on Sat Feb 3 17:50:02 2024
    Am 03.02.2024 um 14:29 schrieb nemethi:
    Am 02.02.24 um 18:45 schrieb Harald Oehlmann:
    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

    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.


    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)