Yes. MListbox is a widget that is built from several Tk core widgets. MListbox consists of no C code itself, and generally relies on its subwidgets to "do the right thing" when it comes to freeing memory that is no longer required.

Each sort operation essentially deletes all data from each Listbox (Column), and then loads each Listbox again with the data once it has been sorted. So, as you can imagine leaks in Listbox are obvious very quickly.

Tk::TextList is a widget that was created several years ago to emulate the functionality provided by Listbox (method calls, look-and-feel, etc), but to give it the power of Text widget tags. In theory, this gives TextList the ability to create and apply styles (tags) at a much greater granularity (per character) than even HList, though, I think the current set of methods support a per-item configuration.

You should be able to plugin TextList every where there is a Listbox call, and it should work, but now that I think about it, there may have been one or two issues with it that I'm not sure if I ever released fixes for. Feel free to experiment with it. I'm going to look at it again as well.

If you have the time to devote to it, I definitely encourage you to experiment with HList. I've also used it for similar purposes in the past, with a reasonable amount of success. Whenver I did, however, I always had this nagging feeling that I was using it to solve problems that it wasn't really created to solve.


In reply to Re^3: Sorted lists in Tk by rcseege
in thread Sorted lists in Tk by mhearse

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.