Maybe this isn't an issue for the quantity of data you're dealing with, but as a rule, widgets tend to impose a cost in terms of memory and cpu overhead -- the more widgets, the slower the GUI, especially if you're talking about creating and destroying lots of widgets during interactive operation.

Actually, you're not likely to see a problem until you get over a few hundreds of widgets (depending on your hardware setup). Still, it would be better to configure the GUI so that it has a constant size and complexity from the user's point of view regardless of data quantity, and so that its memory and execution load grow in very small increments as data quantity increases.

Consider a layout where you present the hash data in a Listbox, and allow the user to select any one Listbox item at a time, in order to edit the selected item -- this means you need only one Entry widget (or one set of Entry widgets, one for each editable "field" in the Listbox item), where the user can alter the content of the selected item. Once the user hits a "commit" button, the chosen entry is replaced in the Listbox (i.e. delete the old and insert the new at the same index).

Changing the contents of a Listbox is quick, easy, stable, and doesn't disrupt the user's view of the process. Changing the quantity of Entry widgets, even if these are in some sort of scrolling frame, is slower and more complicated.


In reply to Re: Tk on the fly by graff
in thread Tk on the fly by Scarborough

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.