X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c838b68e832831f6032fc5ad57f5d0ba9aba7b8c..1c272b5d9e3172f1ad81884cccfc6dc1e694c5e8:/src/common/utilscmn.cpp diff --git a/src/common/utilscmn.cpp b/src/common/utilscmn.cpp index 5e25ae4024..9f14c1b3cb 100644 --- a/src/common/utilscmn.cpp +++ b/src/common/utilscmn.cpp @@ -809,11 +809,19 @@ wxString wxGetTextFromUser(const wxString& message, const wxString& caption, wxString wxGetPasswordFromUser(const wxString& message, const wxString& caption, const wxString& defaultValue, - wxWindow *parent) + wxWindow *parent, + wxCoord x, wxCoord y, bool centre ) { wxString str; - wxTextEntryDialog dialog(parent, message, caption, defaultValue, - wxOK | wxCANCEL | wxTE_PASSWORD); + long style = wxTextEntryDialogStyle; + + if (centre) + style |= wxCENTRE; + else + style &= ~wxCENTRE; + + wxPasswordEntryDialog dialog(parent, message, caption, defaultValue, + style, wxPoint(x, y)); if ( dialog.ShowModal() == wxID_OK ) { str = dialog.GetValue();