Hi Guys,

I am trying to make a text box that will accept a password from user.The password should be masked while typing.

def MyFunc2(self,event):
        box2=wx.TextEntryDialog(None,"Enter Password","PASSWORD","Waiting",style=wx.TE_PASSWORD)
        if box2.ShowModal()==wx.ID_OK:  
            global pwd1
            pwd1=box2.GetValue()

The code is a piece of a program . The above code when run , shows the text box , and i can type into it too (the password typed is shown in dots now), BUT , the OK and CANCEL boxes have vanished.So after typing , i cannot finalize value.

I want to know if TextEntryDialog supports this style.
I am not using 'textctrl' as i will have to create a seperate frame , add buttons and add functionality to that again which is again tedious. TextEntryDialogs works perfect , but the only problem is , password is visible while typing.

So anyone, any ideas.?

There are examples on Daniweb that you can use as well as on the web. This is a very simple and common question.

I am not using 'textctrl' as i will have to create a seperate frame , add buttons and add functionality to that again which is again tedious.

Laziness is not a good quality. Everything, including programming, has a tedious part. In programming you do have to do it yourself, that is why it is called "programming", and not "already programmed". So if you don't enjoy it, find something that you do enjoy.

There are examples on Daniweb that you can use as well as on the web. This is a very simple and common question. Laziness is not a good quality. Everything, including programming, has a tedious part. In programming you do have to do it yourself, that is why it is called "programming", and not "already programmed". So if you don't enjoy it, find something that you do enjoy.

Right you are.

I already have changed my design. I am using TextCtrl which is hectic but definitely will work for me.It helped many more things and I can customize it as per my requirement. Thanks for the tips and inspiration.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.