<div dir="ltr"><div class="gmail_default" style="color:#000000"><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Oct 10, 2013 at 2:29 PM, Skip Montanaro <span dir="ltr"><<a href="mailto:skip@pobox.com" target="_blank">skip@pobox.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">> Removing inappropriate entries is not much of a hack.<br>
<br>
</div>True, but then I have to go through the trouble of adding them back in<br>
should they become valid again. :-)<br></blockquote><div><br></div><div style="color:rgb(0,0,0)" class="gmail_default">It seems that this could be handled fairly straight-forwardly by subclassing either Listbox or Frame to implement your own, custom widget. The trick is to retain references to every entry within the widget, but only embed it in the viewable area if it happens to be a valid entry at that point. Then all that's left is to hook events up to the proper callbacks that implement various actions of your custom widgets using what Tkinter is capable of doing.</div>
<div style="color:rgb(0,0,0)" class="gmail_default"><br></div><div style="color:rgb(0,0,0)" class="gmail_default">Personally I prefer to subclass Frame since it allows me the maximum flexibility (I think 90+% of the widgets I've written for my own Tkinter-based programs do this).</div>
<div style="color:rgb(0,0,0)" class="gmail_default"><br></div><div style="color:rgb(0,0,0)" class="gmail_default">All the best,<br>Jason</div></div>
</div></div>