Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I am working with Tk and am using a TList because I need to be able to format individual entries (some need to be highlighted , so Listbox is not adequate).

My problem is that I also want to restrict entries to one column if the window is resized. I can't find anything in the documentation to do that. It seems to only make use of horizontal scrollbars when there are multiple columns.

Replies are listed 'Best First'.
Re: Restricting TList columns
by eXile (Priest) on Apr 10, 2004 at 06:35 UTC
    Hi,
    the Mastering Perl/Tk O'Reilly book has some information on this. In the paragraph about TLists they say vertical scrollbars do'nt work because of the automatic column feature. The TList wraps to the next column based on the current height of the window, regardless of whether there is a vertical scrollbar.
Re: Restricting TList columns
by zentara (Cardinal) on Apr 10, 2004 at 16:11 UTC
    I'm not sure what your problem is, from your sparse description, but the various $tlist->xview methods seem to be the only thing you can do, unless you want to rebuild the $tlist only showing the column you want. There is nothing stopping you from having different $tlist objects, each with a different number of columns.

    I'm not really a human, but I play one on earth. flash japh