WEB开发网
开发学院手机开发Symbian 开发 Symbian CAknSettingItemList使用心得 阅读

Symbian CAknSettingItemList使用心得

 2010-09-06 08:11:00 来源:WEB开发网   
核心提示:8, 若Skin被禁止,CAknSliderSettingPage中的current value, min/max label看不见,Symbian CAknSettingItemList使用心得(3),原因是它们的颜色跟背景色相同,可以同过设置字体颜色来解决

8, 若Skin被禁止,CAknSliderSettingPage中的current value, min/max label看不见,原因是它们的颜色跟背景色相同。可以同过设置字体颜色来解决。

1) In CAnkSliderSettingItem derived class, override member function CreateSettingPageL() as below:

CAknSettingPage *CreateSettingPageL()

{

CMyAknSettingPage *settingPage = new (ELeave) CMyAknSettingPage(SettingPageResourceId(), InternalSliderValue());

settingPage->SetSettingTextL(SettingName());

return dynamic_cast settingPage;

}

2) Customize Setting page

class CMyAknSettingPage : public CAknSliderSettingPage

{

public:

CMyAknSettingPage(TInt aResourceId, TInt &aSliderValue) :

CAknSliderSettingPage(aResourceId, &aSliderValue)

{

}

void ConstructL()

{

CAknSliderSettingPage()::ConstructL();

SliderControl()->OverrideColor(EColorLabelText, KRgbBlack); //Set label text color

ActivateL()

}

void SizeChanged()

{

CAknSliderSettingPage:SizeChanged();

CAknSlider *slider = SliderControl();

if(slider)

{

slider->->OverrideColor(EColorLabelText, KRgbBlack); //Set label text color

slider->DrawNow();

}

}

}

上一页  1 2 3 

Tags:Symbian CAknSettingItemList 使用

编辑录入:coldstar [复制链接] [打 印]
赞助商链接