If you edit a string property that has the wxPG_PROP_PASSWORD attribute
then all the characters in your string would be converted to '*'s (with the
exception of any you'd added during the editing).
The problem can be fixed by making a change to
wxPGTextCtrlEditor::CreateControls (in propgrid.cpp):
wxWindow* wxPGTextCtrlEditor::CreateCntrols(....)
{
wxString text;
<**snip**>
int flags = 0;
if ( (property->GetFlags() & wxPG_PROP_PASSWORD) &&
property->IsKindOf(WX_PG_CLASSINFO(wxStringProperty)) )
{
// THE FOLLOWING LINE ADDED
text =
property->GetValueAsString(property->HasFlag(wxPG_PROP_READONLY)?0:wxPG_FUL
L_VALUE);
flags |= wxTE_PASSWORD
}
<**snip**>
return wnd;
}
Basically in the case of a password field we want to pass wxPG_FULL_VALUE
to GetValueAsString so we can get the real string and not the '*'ed one.
The real string will be protected in the wxTextCtrl through the use of the
wxTE_PASSWORD attribute.
Jaakko Salli
None
Must fix
Public
|
Date: 2007-11-12 17:39
|
| Field | Old Value | Date | By |
|---|---|---|---|
| status_id | Open | 2007-11-12 17:39 | jmsalli |
| resolution_id | None | 2007-11-12 17:39 | jmsalli |
| assigned_to | nobody | 2007-11-12 17:39 | jmsalli |
| close_date | - | 2007-11-12 17:39 | jmsalli |
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use