Symbian CAknSettingItemList使用心得
2010-09-06 08:11:00 来源:WEB开发网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
}
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();
}
}
}
Tags:Symbian CAknSettingItemList 使用
编辑录入:coldstar [复制链接] [打 印]更多精彩
赞助商链接