×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    May 2004
    Posts
    12

    buttons in dialog

    Hi.
    I am creating a new dialog resource and want to add buttons to it. I had written the following code in the .rss file.
    I am facing problems when button = r_done_cba, is used, however if I use the default buttons instead, the program runs fine.
    Could anyone please help.

    RESOURCE DIALOG r_test_dialog
    {
    title = "Voice Recorder";
    buttons = r_done_cba ;
    flags = EEikDialogFlagNoDrag | EEikDialogFlagFillAppClientRect | EEikDialogFlagModeless;
    items =
    {
    DLG_LINE
    {
    type = EEikCtBitmapButton;
    prompt = "Protocol";
    id = ESoundCmdTone;
    //control = EDWIN {width = 25; maxlength = 100; };
    }
    };
    }

    RESOURCE DLG_BUTTONS r_done_cba
    {
    flags=EEikButtonGroupAddToStack;
    buttons=
    {
    DLG_BUTTON
    {
    id=ESoundCmdPlay;
    buttontype = EEikCtCommandButton ;
    button = CMBUT
    {
    txt = "Play";
    };
    flags = EEikLabeledButtonIsDefault;
    line = 1;
    }
    };
    }

  2. #2
    Super Contributor
    Join Date
    Apr 2003
    Location
    Czech Republic
    Posts
    915
    I guess you can use CBA buttons:
    Code:
    RESOURCE CBA r_softkeys_yes_no
        {
        buttons =
            {
            CBA_BUTTON 
                {
                id = EAknSoftkeyYes; 
                txt = qtn_cba_text_yes;
                },
            CBA_BUTTON 
                {
                id = EAknSoftkeyNo; 
                txt = qtn_cba_text_no; 
                }
            };
        }

  3. #3
    Registered User
    Join Date
    May 2004
    Posts
    12
    I can use them, but thet'll ive me soft keys. I want some buttons on the dialog such as Play, Stop, Rewind, Forward, etc.
    I need to achieve this. Any idea.

  4. #4
    Regular Contributor
    Join Date
    Jan 2004
    Location
    Braunschweig, Germany
    Posts
    345
    That is what the txt attribute is for. With this attribute you can set any text like 'Play' or 'Stop'

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •