Discussion Board
-
Dialog with a CAknSlider
2004-07-07, 15:16
#1
Registered User
Hi,
I´m trying to use a dialog with a CAknSlider, but the Dialog show only one part of the slide.
I defined the resource as follows:
RESOURCE DIALOG r_slide
{
title="Choose";
flags=EEikDialogFlagWait|EEikDialogFlagAllKeysToButtons;
buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
items=
{
DLG_LINE
{
id = EInputFieldDlgLabel;
type=EEikCtLabel;
control=LABEL
{
horiz_align=EEikLabelAlignHLeft;
txt ="Ajuste";
vert_align=EEikLabelAlignVTop;
//reserve_length=10;
};
},
DLG_LINE
{
type=EAknCtSlider;
prompt="Luz";
id=EInputFieldDlgField;
control= SLIDER
{
layout = EAknSettingsItemSliderLayout;
minvalue = 0;
maxvalue = 2;
step = 1;
valuetype = EAknSliderValueBareFigure;
valuetype = EAknSliderValueDecimal;
minlabel = "escuro";
maxlabel = "claro";
};
}
};
}
My code:
class MySlide : public CEikDialog
void CInputFieldDlg::PreLayoutDynInitL()
{
CAknSlider* slider = STATIC_CAST(CAknSlider*, Control(EInputFieldDlgField));
slider->SetRange(0, 10);
CEikLabel* label = STATIC_CAST(CEikLabel*,Control(EInputFieldDlgLabel));
HBufC* buf = iCoeEnv->AllocReadResourceLC(iLabelResourceId);
label->SetTextL(*buf);
CleanupStack::PopAndDestroy(buf);
SetTitleL(iTitleResourceId);
}
-
Registered User
Hi!
Did you get that work? I have same problem, only changing value shows and slider is hiding. Is there some way to get bigger that dialog box?
-
Re: Dialog with a CAknSlider
2006-06-27, 08:40
#3
Registered User
Hi,
Did u get a solution for this problem?
slider can be placed in form and edited well,but not in AknDialog subclass?
-
Re: Dialog with a CAknSlider
2006-06-27, 11:32
#4
Registered User
Create custom dialog using SetSizeAndPosition method so that dialog can fit the slider.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules