From: Alex T. <al...@tw...> - 2007-10-16 22:26:17
|
Christoph Schneeberger wrote: > Hi, > > I have a problem with the |dialog.textEntryDialog when using > |wx.TE_PASSWORD (and wx.TE_MULTILINE) as in the following code: > > result = dialog.textEntryDialog(self, 'Password for user ', 'Password', > '', wx.TE_PASSWORD) > > as soon as I add the fourth argument (wx.TE_PASSWORD or wx.TE_MULTILINE) > I get no more OK/Cancel buttons in the dialog and Enter doesn't help too. > > I even tried adding it to the sample dialog and it behaved the same way, > so I assume it has something to do with my platform: Win2000, > Python2.51, Pythoncard 0.82, wxpython 2.8.4.2. > [ Note - this is typed from memory &/or reading code - not from actually trying it - I'm unfortunately not in a position to reach a computer I can do that on right now .... so it should be treated with a small amount of caution ] When you add the fourth parameter, you need to completely specify what you want. The default is to have OK and Cancel buttons, so instead of > result = dialog.textEntryDialog(self, 'Password for user ', 'Password', > '', wx.TE_PASSWORD) > you should have > result = dialog.textEntryDialog(self, 'Password for user ', 'Password', > '', wx.TE_PASSWORD | wx.OK | wx.CANCEL) > or you could simply use the convenience dialogs, as in > result = dialog.passwordTextEntryDialog(self, 'Password for user ', 'Password', > '') > -- Alex Tweedly mailto:al...@tw... www.tweedly.net |