implementation of wxGetPasswordFromUser
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -880,12 +880,32 @@ wxString wxGetTextFromUser(const wxString& message, const wxString& caption,
|
|||||||
const wxString& defaultValue, wxWindow *parent,
|
const wxString& defaultValue, wxWindow *parent,
|
||||||
int x, int y, bool WXUNUSED(centre) )
|
int x, int y, bool WXUNUSED(centre) )
|
||||||
{
|
{
|
||||||
|
wxString str;
|
||||||
wxTextEntryDialog dialog(parent, message, caption, defaultValue, wxOK|wxCANCEL, wxPoint(x, y));
|
wxTextEntryDialog dialog(parent, message, caption, defaultValue, wxOK|wxCANCEL, wxPoint(x, y));
|
||||||
if (dialog.ShowModal() == wxID_OK)
|
if (dialog.ShowModal() == wxID_OK)
|
||||||
return dialog.GetValue();
|
{
|
||||||
else
|
str = dialog.GetValue();
|
||||||
return wxString("");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString wxGetPasswordFromUser(const wxString& message,
|
||||||
|
const wxString& caption,
|
||||||
|
const wxString& defaultValue,
|
||||||
|
wxWindow *parent)
|
||||||
|
{
|
||||||
|
wxString str;
|
||||||
|
wxTextEntryDialog dialog(parent, message, caption, defaultValue,
|
||||||
|
wxOK | wxCANCEL | wxTE_PASSWORD);
|
||||||
|
if ( dialog.ShowModal() == wxID_OK )
|
||||||
|
{
|
||||||
|
str = dialog.GetValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
#endif // wxUSE_TEXTDLG
|
#endif // wxUSE_TEXTDLG
|
||||||
|
|
||||||
#ifdef __MWERKS__
|
#ifdef __MWERKS__
|
||||||
|
Reference in New Issue
Block a user