Adding a password field to a PPG


You can use the Edit styles defined in WinUser.h with siUIStyle to get a password-entry text box. The ES_PASSWORD style displays all characters typed by the user as asterisks (*).

var oCustomProperty = XSIFactory.CreateObject( "CustomProperty" );
oCustomProperty.AddParameter( "password", siString, siClassifUnknown, siSilent, "", "", "", "", 0, 1, 0, 1 );

oLayout = oCustomProperty.PPGLayout;
oLayout.Clear();

var oItem = oLayout.AddItem( "password", "Password", siControlEdit );
oItem.SetAttribute( siUIStyle, 32 ); // #define ES_PASSWORD         0x0020L

InspectObj( oCustomProperty );

On the XSI list, see the thread PPG with star password input?