TkTable -- setting column widths

J

Joe Van Dyk

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
 
J

Joe Van Dyk

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.
 
J

Joe Van Dyk

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top