TkTable -- setting column widths

Discussion in 'Ruby' started by Joe Van Dyk, May 10, 2005.

  1. Joe Van Dyk

    Joe Van Dyk Guest

    Is it possible to set an individual column in a TkTable to be a
    different width than the default?

    I'm looking at http://tcl.activestate.com/community/hobbs/tcl/. It
    looks like I should be able to do something like

    @table.tag_col('WideCol', 2)
    @table.width('WideCol', 20)

    Which would tag the second column with 'WideCol' and then set all
    columns that are tagged with 'WideCol' to width 20. But #width() just
    wants one argument, although the tcl docs look like it can support
    more.

    Thanks,
    Joe
    Joe Van Dyk, May 10, 2005
    #1
    1. Advertising

  2. Joe Van Dyk

    Joe Van Dyk Guest

    On 5/10/05, Joe Van Dyk <> wrote:
    > Is it possible to set an individual column in a TkTable to be a
    > different width than the default?
    >=20
    > I'm looking at http://tcl.activestate.com/community/hobbs/tcl/. It
    > looks like I should be able to do something like
    >=20
    > @table.tag_col('WideCol', 2)
    > @table.width('WideCol', 20)
    >=20
    > Which would tag the second column with 'WideCol' and then set all
    > columns that are tagged with 'WideCol' to width 20. But #width() just
    > wants one argument, although the tcl docs look like it can support
    > more.


    Actually, what I'd really like to have is the ability for each TkTable
    columns to stretch out to fit their biggest member.
    Joe Van Dyk, May 10, 2005
    #2
    1. Advertising

  3. Joe Van Dyk

    Joe Van Dyk Guest

    On 5/10/05, Joe Van Dyk <> wrote:
    > Is it possible to set an individual column in a TkTable to be a
    > different width than the default?
    >=20
    > I'm looking at http://tcl.activestate.com/community/hobbs/tcl/. It
    > looks like I should be able to do something like
    >=20
    > @table.tag_col('WideCol', 2)
    > @table.width('WideCol', 20)
    >=20
    > Which would tag the second column with 'WideCol' and then set all
    > columns that are tagged with 'WideCol' to width 20. But #width() just
    > wants one argument, although the tcl docs look like it can support
    > more.


    Ah, just figured it out.

    @table.set_width([1, 18], [3, 18], [0, 4])

    Will set column 1 to width 18, column 3 to width 18, and column 0 to width =
    4.
    Joe Van Dyk, May 10, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rachel Devons

    Setting column widths in DataList?

    Rachel Devons, Jun 18, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    983
    Eliyahu Goldin
    Jun 19, 2005
  2. =?Utf-8?B?U3RldmUgQnVnZGVu?=

    Setting GridVIew column widths at runtime

    =?Utf-8?B?U3RldmUgQnVnZGVu?=, Mar 6, 2006, in forum: ASP .Net
    Replies:
    5
    Views:
    18,537
    =?Utf-8?B?U3RldmUgQnVnZGVu?=
    Mar 7, 2006
  3. Gary Wessle

    TkTable for info gathering

    Gary Wessle, May 12, 2006, in forum: Python
    Replies:
    0
    Views:
    311
    Gary Wessle
    May 12, 2006
  4. Replies:
    1
    Views:
    644
  5. Greg Smith

    Setting column widths in a GridView

    Greg Smith, Sep 28, 2006, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    732
    Greg Smith
    Sep 28, 2006
Loading...

Share This Page