Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > TkTable -- setting column widths

Reply
Thread Tools

TkTable -- setting column widths

 
 
Joe Van Dyk
Guest
Posts: n/a
 
      05-10-2005
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


 
Reply With Quote
 
 
 
 
Joe Van Dyk
Guest
Posts: n/a
 
      05-10-2005
On 5/10/05, Joe Van Dyk <(E-Mail Removed)> 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.


 
Reply With Quote
 
 
 
 
Joe Van Dyk
Guest
Posts: n/a
 
      05-10-2005
On 5/10/05, Joe Van Dyk <(E-Mail Removed)> 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.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting column widths in a GridView Greg Smith ASP .Net Datagrid Control 0 09-28-2006 02:08 PM
Tktable, WinXP and ActiveState Python 2.4.3,x jerry.levan@gmail.com Python 1 06-01-2006 10:40 PM
TkTable for info gathering Gary Wessle Python 0 05-12-2006 05:11 PM
Setting GridVIew column widths at runtime =?Utf-8?B?U3RldmUgQnVnZGVu?= ASP .Net 5 03-07-2006 12:05 PM
Setting column widths in DataList? Rachel Devons ASP .Net 1 06-19-2005 09:56 AM



Advertisments