×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Apr 2004
    Posts
    3

    Dialog with a CAknSlider

    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);
    }

  2. #2
    Registered User
    Join Date
    Aug 2004
    Posts
    5
    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?

  3. #3
    Registered User
    Join Date
    Jan 2005
    Posts
    391

    Re: Dialog with a CAknSlider

    Hi,
    Did u get a solution for this problem?

    slider can be placed in form and edited well,but not in AknDialog subclass?

  4. #4
    Registered User
    Join Date
    Apr 2006
    Posts
    4

    Re: Dialog with a CAknSlider

    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
  •