Revision as of 14:38, 13 March 2012 by debjit.roy (Talk | contribs)

Archived:How to Use CAknSliderSettingPage for creating dynamic slider

From Nokia Developer Wiki
Jump to: navigation, search
Reviewer Approved    Thumbs up icon sm.jpg
Article Metadata
Tested with
Devices(s): S60
Keywords: CAknSliderSettingPage, CAknSlider
Created: chenziteng (27 Sep 2009)
Last edited: debjit.roy (13 Mar 2012)

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

Class CAknSliderSettingPage provides functionality to create slider setting page on S60 3rd Edition phones and you can implement it in your application as follows.

RSG File:

// YouRssFile.rsg
// begin by chen
#define qtn_my_slider_item_title "Test"
#define STRING_r_minimum "Min"
#define STRING_r_maximum "Max"
// "S60 slider incomplete resource causes out of memory failure"
// http://www.developer.nokia.com/Community/Discussion/showthread.php?108981-S60-slider-incomplete-resource-causes-out-of-memory-failure
RESOURCE AVKON_SETTING_PAGE r_my_slider_item_setting_page
label = qtn_my_slider_item_title;
type = EAknCtSlider;
editor_resource_id = r_my_slider_item_slider;
RESOURCE SLIDER r_my_slider_item_slider
layout = EAknSettingsItemSliderLayout;
minvalue = 0;
maxvalue = 10;
step = 1;
valuetype = EAknSliderValueBareFigure;
minlabel = STRING_r_minimum;
maxlabel = STRING_r_maximum;
// end by chen

cpp file.

// .cpp

// begin by chen
#include <YourRssFile.rsg> // R_MY_SLIDER_ITEM_SETTING_PAGE
#include <AknSliderSettingPage.h> // CAknSliderSettingPage
// end by chen
// begin by chen
TInt value = 0;
CAknSliderSettingPage* ssp = new(ELeave) CAknSliderSettingPage(R_MY_SLIDER_ITEM_SETTING_PAGE, value);
// begin, change the slider range programically
CAknSlider* slider = ssp->SliderControl();
// end
TBool ret = ssp->ExecuteLD();
// value is the slider value
// do someting to handle it
// end by chen

Source Code:

Full example: HelloWorld(SliderSettingPage).zip



74 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.