Design problem...need some ideas

Mudcat mnations at gmail.com
Thu May 26 00:20:06 EDT 2005


Howdy,

I'm trying to create a selection helper, just like in Google or other
places where a drop-down menu appears below the text selection box when
you enter some text. As you type, the choices are narrowed based on the
characters entered.

I have everything worked out but the actual menu which is giving me
problems. My first attempt was using a Pmw.ScrolledListBox and taking
advantage of the inherent drop-down menu. I was attempting to invoke
the menu and change the list as characters were typed.

However, I found I was getting focus problems. When the menu is
invoked, focus in the entry box is lost which makes it impossible for
the user to continue typing his selection. When focus is returned to
the entry box, the drop-down menu disappears. Is there a way to make
this work?

Or, is there a better way? My Plan B was to create a new toplevel
window and place it using screen geometry to appear right below the
entry box. The window was going to contain just a listbox that
contained the selections. But I fear this may pose many more problems,
focus just being one of them.

Thanks ahead of time for the help,
Marc




More information about the Python-list mailing list