Re: Question/Problem with

Alex Tweedly <[email protected]>
Newsgroups gmane.comp.python.pythoncard
Message-ID <[email protected]>
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:[email protected]      www.tweedly.net

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

_______________________________________________
Pythoncard-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pythoncard-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.