<< Return to Main Index

< Return to Class Index

class CGXPasswordControl: public CGXEditControl

The CGXPasswordControl class implements a text input control for passwords. When the user modifies the text, a password character (e.g., an asterisk, '*') will be shown for each entered character.

You can determine the password text with GetValueRowCol() programmatically.

Style attributes which specify the appearance of the cell are:

If you want to change the password character you have to register the control in the OnInitialUpdate routine.

Example:

   CGXPasswordControl* pPwdControl = new CGXPasswordControl(this,
      GX_IDS_CTRL_PASSWORD);
   pPwdControl->m_chPasswordChar = _T('@'); // use @ as password char
   RegisterControl(GX_IDS_CTRL_PASSWORD, pPwdControl);

and later apply it to cells with

   SetStyleRange(CGXRange(4,3,10,5),
      CGXStyle()
         .SetControl(GX_IDS_CTRL_PASSWORD)
      );

#include <gxall.h>

See Also

CGXGridCore::RegisterControl CGXStyle::SetControl CGXStyle

CGXPasswordControl

Class Members