[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

TkTable -- setting column widths

Joe Van Dyk

5/10/2005 9:30:00 PM

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


2 Answers

Joe Van Dyk

5/10/2005 9:32:00 PM

0

On 5/10/05, Joe Van Dyk <joevandyk@gmail.com> wrote:
> 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/.... 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.

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

5/10/2005 9:37:00 PM

0

On 5/10/05, Joe Van Dyk <joevandyk@gmail.com> wrote:
> 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/.... 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.

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.