Categories: Symbian C++ | How To | UI | Customization | Code Examples
This page was last modified 16:22, 23 June 2008.
How to control visibility of a setting item in Setting Listbox
From Forum Nokia Wiki
CAknSettingItemList is defined in aknsettingitemlist.h. Creating settings items is discussed here
Create setting item listbox from resource with some items in it.
iListBox = new ( ELeave ) CAknSettingItemList; ----- ----- iListBox->ConstructFromResourceL(R_SETTINGS_LIST ) iListBox->ActivateL();
To hide an item or make invisible SetHidden(ETrue) is to be called on that item.
(*(iListBox->SettingItemArray()))[index]->SetHidden(ETrue);
The setting item array must have to be notified of this by calling CAknSettingItemList::HandleChangeInItemArrayOrVisibility
iListBox->HandleChangeInItemArrayOrVisibilityL();
Note that the items are hidden and not deleted. They can still be accessed using (*SettingItemArray())[index] where index indicates the hidden item number.
Also that SettingItemArray()->MdcaCount() gives only the visible number of items (because of which one may think that the hidden item is deleted. ) SettingItemArray()->Count() gives the total number of items in the SettingList (visible + invisible).
SettingItemArray()->VisibleCount ( ) Returns the number of visible items.
Use Cases
Hide one setting item to prevent the situation where two settings items should not be simultaneously switched ON.
Example Project
The types of settings item that can appear in a list can be found here.
The following sample application creates a slider control setting item and becomes invisible when you select “Hidden” from Options menu.
Internal Links
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| problem in Setting Page Application | amey_symbian | General Symbian C++ | 2 | 2008-06-20 10:57 |
| OMA bootstrap setting for nokia 6220 and 6600 | vmoreno1972 | OMA DM/DS/CP | 23 | 2003-12-09 14:29 |
| Any idea on how to set the listbox items in different height :) | ClickLee | Symbian User Interface | 2 | 2008-09-01 16:24 |
| EEikCtSecretEd \ Password Setting Item - known problem? | mark_williams | Symbian User Interface | 2 | 2004-03-10 11:13 |
| How to set AknForm to 'edit-mode' at runtime? | gkropitz | General Symbian C++ | 1 | 2002-10-12 18:40 |
