Namespaces
Variants
Actions

Creating settings list item that allows an empty string

Jump to: navigation, search
Article Metadata

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.
91 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved