If I understand you, you're talking about controlling the number of RadioButton widgets present/visible on the GUI, according to the number of entries in a database, and changing the number of buttons at run-time, according to database entries being deleted or created by the user.
This is the sort of thing I would tend to put in a drop-down or pop-up menu, or in a listbox (where setting "selectMode" to "single" has the effect of making the listbox items behave like radio buttons). It's relatively easy to add or remove elements from a menu, and the pop-up or drop-down behavior means that changes in the set of buttons can go on "behind the scenes". It's really easy to add or remove items from a listbox, which has the added advantage of providing a simple scrolling mechanism (see Tk::Scrolled).
Either a pull-down menu or a listbox would be a lot more effecient than re-running the geometry manager on one or more frames to add and remove whole widgets -- and could even seem more sensible from the user's perspective.
Is there some compelling reason to be adding and destroying radio buttons in the main window while the user is watching?
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.