• Tablelist problem - probably user error

    From Alan Grunwald@nospam.nurdglaw@gmail.com to comp.lang.tcl on Fri Dec 19 18:43:56 2025
    From Newsgroup: comp.lang.tcl

    Short version: How do I get text centred vertically in a tablelist cell?

    I'm using a home-brew tcl 9.0.3 with tablelist (strictly tablelist_tile)
    7.8.

    Long version:

    I have a habit of including a history in my source code. This is a list
    of 4*n entries, with each quadruple comprising the version number,
    author's name, date and a description of the changes. I then include a
    menu entry to display the history. (Pretentious, I know, but
    occasionally useful.)

    I've just re-written this code to use a tablelist with four columns
    rather than a text widget with tabs to get things to line up.

    Sometimes the description is quite long, and by default the tablelist
    aligns things halfway down the cell, which hard to read. I'd like
    everything to be at the top of the cells, so I've specified

    -valign top

    on all four columns.

    Sadly, the lines are still centred vertically, see the image here -

    Here's the configuration that I think is relevant:

    % foreach col {0 1 2 3} {
    puts stdout [format {%d - alignment: %s; wrap: %s; contents:
    %s} $col [$tbl cellcget 1,$col -valign] [$tbl columncget $col -wrap]
    [$tbl cellcget 1,$col -text]]
    }
    0 - alignment: top; wrap: 0; contents: 1.1
    1 - alignment: top; wrap: 0; contents: Alan Grunwald
    2 - alignment: top; wrap: 0; contents: 13-May-2016
    3 - alignment: top; wrap: 1; contents: (Collapsed draft version
    1.1 comments.) Add ability to paste in a bridgewebs scorecard.


    What have I missed?

    Alan
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Alan Grunwald@nospam.nurdglaw@gmail.com to comp.lang.tcl on Fri Dec 19 18:48:12 2025
    From Newsgroup: comp.lang.tcl

    On 19/12/2025 18:43, Alan Grunwald wrote:
    Short version: How do I get text centred vertically in a tablelist cell?

    I'm using a home-brew tcl 9.0.3 with tablelist (strictly tablelist_tile) 7.8.

    Long version:

    I have a habit of including a history in my source code. This is a list
    of 4*n entries, with each quadruple comprising the version number,
    author's name, date and a description of the changes. I then include a
    menu entry to display the history. (Pretentious, I know, but
    occasionally useful.)

    I've just re-written this code to use a tablelist with four columns
    rather than a text widget with tabs to get things to line up.

    Sometimes the description is quite long, and by default the tablelist
    aligns things halfway down the cell, which hard to read. I'd like
    everything to be at the top of the cells, so I've specified

          -valign top

    on all four columns.

    Sadly, the lines are still centred vertically, see the image here -

    Here's the configuration that I think is relevant:

          % foreach col {0 1 2 3} {
              puts stdout [format {%d - alignment: %s; wrap: %s; contents:
    %s} $col [$tbl cellcget 1,$col -valign] [$tbl columncget $col -wrap]
    [$tbl cellcget 1,$col -text]]
          }
          0 - alignment: top; wrap: 0; contents: 1.1
          1 - alignment: top; wrap: 0; contents: Alan Grunwald
          2 - alignment: top; wrap: 0; contents: 13-May-2016
          3 - alignment: top; wrap: 1; contents: (Collapsed draft version 1.1 comments.) Add ability to paste in a bridgewebs scorecard.


    What have I missed?

    Alan

    Hmm. My attempts to attach an image having failed, I haven't even
    managed to include a link. I hope this try works better - https://justpaste.it/mgr5o

    Or, with loads of spaces to confuse the reader h t t p s : / / j u s t p
    a s t e . i t / m g r 5 o
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From nemethi@csaba.nemethi@t-online.de to comp.lang.tcl on Sat Dec 20 14:08:24 2025
    From Newsgroup: comp.lang.tcl

    Am 19.12.25 um 19:43 schrieb Alan Grunwald:
    Short version: How do I get text centred vertically in a tablelist cell?

    I'm using a home-brew tcl 9.0.3 with tablelist (strictly tablelist_tile) 7.8.

    Long version:

    I have a habit of including a history in my source code. This is a list
    of 4*n entries, with each quadruple comprising the version number,
    author's name, date and a description of the changes. I then include a
    menu entry to display the history. (Pretentious, I know, but
    occasionally useful.)

    I've just re-written this code to use a tablelist with four columns
    rather than a text widget with tabs to get things to line up.

    Sometimes the description is quite long, and by default the tablelist
    aligns things halfway down the cell, which hard to read. I'd like
    everything to be at the top of the cells, so I've specified

          -valign top

    on all four columns.

    Sadly, the lines are still centred vertically, see the image here -

    Here's the configuration that I think is relevant:

          % foreach col {0 1 2 3} {
              puts stdout [format {%d - alignment: %s; wrap: %s; contents:
    %s} $col [$tbl cellcget 1,$col -valign] [$tbl columncget $col -wrap]
    [$tbl cellcget 1,$col -text]]
          }
          0 - alignment: top; wrap: 0; contents: 1.1
          1 - alignment: top; wrap: 0; contents: Alan Grunwald
          2 - alignment: top; wrap: 0; contents: 13-May-2016
          3 - alignment: top; wrap: 1; contents: (Collapsed draft version 1.1 comments.) Add ability to paste in a bridgewebs scorecard.


    What have I missed?

    Alan

    As specified in the documentation, the -valign option specifies the
    vertical alignment of embedded images and windows only. Due to
    restrictions imposed by the underlying text widget there is no way to
    support this options for the texts too, sorry!
    --
    Csaba Nemethi https://www.nemethi.de mailto:csaba.nemethi@t-online.de
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Alan Grunwald@nospam.nurdglaw@gmail.com to comp.lang.tcl on Sun Dec 21 13:24:06 2025
    From Newsgroup: comp.lang.tcl

    On 20/12/2025 13:08, nemethi wrote:
    Am 19.12.25 um 19:43 schrieb Alan Grunwald:
    Short version: How do I get text centred vertically in a tablelist cell?

    I'm using a home-brew tcl 9.0.3 with tablelist (strictly
    tablelist_tile) 7.8.

    Long version:

    I have a habit of including a history in my source code. This is a
    list of 4*n entries, with each quadruple comprising the version
    number, author's name, date and a description of the changes. I then
    include a menu entry to display the history. (Pretentious, I know, but
    occasionally useful.)

    I've just re-written this code to use a tablelist with four columns
    rather than a text widget with tabs to get things to line up.

    Sometimes the description is quite long, and by default the tablelist
    aligns things halfway down the cell, which hard to read. I'd like
    everything to be at the top of the cells, so I've specified

           -valign top

    on all four columns.

    Sadly, the lines are still centred vertically, see the image here -

    Here's the configuration that I think is relevant:

           % foreach col {0 1 2 3} {
               puts stdout [format {%d - alignment: %s; wrap: %s;
    contents: %s} $col [$tbl cellcget 1,$col -valign] [$tbl columncget
    $col -wrap] [$tbl cellcget 1,$col -text]]
           }
           0 - alignment: top; wrap: 0; contents: 1.1
           1 - alignment: top; wrap: 0; contents: Alan Grunwald
           2 - alignment: top; wrap: 0; contents: 13-May-2016
           3 - alignment: top; wrap: 1; contents: (Collapsed draft version
    1.1 comments.) Add ability to paste in a bridgewebs scorecard.


    What have I missed?

    Alan

    As specified in the documentation, the -valign option specifies the
    vertical alignment of embedded images and windows only.  Due to restrictions imposed by the underlying text widget there is no way to support this options for the texts too, sorry!


    Thanks Csaba,

    Good to know I haven't missed anything (apart from the restriction in
    the -valign documentation).
    --- Synchronet 3.21a-Linux NewsLink 1.2