Harri Pasanen: Re: [Idle-dev] Known bug? Saving fails in IDLE if
accents used in char acters
Neal Norwitz
neal@metaslash.com
Mon, 24 Mar 2003 09:10:09 -0500
On Mon, Mar 24, 2003 at 02:55:48PM +0100, Martin von Loewis wrote:
> > The entry widget works fine, it needs to be disabled to prevent it
> > from being modified:
> >
> > >>> from Tkinter import *
> > >>> tk = Tk()
> > >>> entry = Entry()
> > >>> entry.pack()
> > >>> entry.insert(0, 'test, test, test')
> > >>> entry.configure(state=DISABLED)
>
> I see. Unfortunately, the code currently uses tkMessageBox,
> which cannot be customized to use an Entry instead of
> a label (or message widget), nor can Dialog be customized
> in this way. I'm now looking into writing a full dialog
> inheriting from SimpleDialog, completely rewriting its
> __init__ :-(
Could you use tkSimpleDialog._QueryString and replace the body method?
The body would need to set the string and disable the entry.
Might need to use another kwarg for the string.
Neal