Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

CEikSecretEditor Size

From Wiki
Jump to: navigation, search
Article Metadata
Created: rathodavinash (27 Jun 2007)
Last edited: hamishwillee (19 Jul 2012)

If there is a need for a custom password/secret editor, a custom control derived from CEikSecretEditor is required. Now CEikSecretEditor is the only editor that has not been derived from CEikEdwin. So it (And control derived from it, i.e. CAknNumericSecretEditor) does not have ConstructL variants to set size in pixels/characters. If a custom secret editor is required be sure to set its correct size using SetPosition and SetSize functions.

Also the password/secret control can never be created without a resource. So always have a dummy resource file for a Secret editor

RESOURCE SECRETED r_my_secret_editor
num_letters = 10;

The num_letters can always be modified using the SetMaxLength function.

Also whenever the controls MinimumSize is called the default values will be returned. i.e. the size of the editor reported wont be the one you set using SetSize. It will be the size when the editor was created using

TResourceReader reader;
CCoeEnv::Static()->CreateResourceReaderLC(reader, R_MY_SECRET_EDITOR);

So always return the Rect what is set using SetSize function.

This page was last modified on 19 July 2012, at 06:27.
54 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.