×
Namespaces

Variants
Actions

Creating settings list item that allows an empty string

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Compatibility
Platform(s):
Symbian
Article
Created: Paul.Todd (22 Oct 2007)
Last edited: hamishwillee (27 Jul 2012)

By default CAknSettingItem and its derived classes expect to have some text in the editor before they will allow the field to be saved (by enabling the OK button).

To disable this behaviour and allow an empty string, after creating the Settings item, call SetSettingPageFlags(CAknTextSettingPage::EZeroLengthAllowed).

#include <AknTextSettingPage.h>
...
CAknSettingItem* item = NULL;
...
case EMySettingsItem:
item = new CAknTextSettingItem(aId, iMyString);
item->SetSettingPageFlags(CAknTextSettingPage::EZeroLengthAllowed);
break;
 
...
 
return item;

See Also

This page was last modified on 27 July 2012, at 10:39.
37 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.

×