Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 25
  1. #1
    Regular Contributor ameybarve's Avatar
    Join Date
    Nov 2007
    Location
    Pune, India
    Posts
    94
    Hi All,
    Thanks in Advance.

    I want to develop a custom dialog control. In this discussion board i have seen many posts that have mentioned about adding custom controls to dialog. Is this same as custom dialog itself?

    If not how can i customize a dialog? Any code will be helpful.
    Sample application for custom dialog will be appreciated.
    Regards,
    Amey

  2. #2
    Regular Contributor Tatavarthi's Avatar
    Join Date
    Aug 2007
    Location
    India
    Posts
    83
    If you want to keep any lable to your Dialog
    you need to mention it in resource file as

    RESOURCE DIALOG r_simpledlg_player_name_dialog

    {

    flags = EEikDialogFlagNoDrag | EEikDialogFlagCbaButtons | EEikDialogFlagWait;

    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;



    items =

    {

    DLG_LINE

    {

    id = EConfirmationNoteDlgCIdPlayerName;

    type = EEikCtLabel;

    control = LABEL// This attribute is u want to add is it??

    {

    };

    },
    };
    }

    Hope this will helps you.Let me know if this is not what exactly you want..

    Regards,
    Pavan

  3. #3
    Regular Contributor ameybarve's Avatar
    Join Date
    Nov 2007
    Location
    Pune, India
    Posts
    94
    Hi Tatavarthi,
    Thanks for your prompt reply.

    What i want is to create a custom dialog control.
    I have derived my class from CEikDialog and implemented its methods.

    What i want is to insert controls like you mentioned (label)dynamically and not using resource file to this custom dialog.

    Any sample application for custom dialog will be appreciated.
    Regards,
    Amey

  4. #4
    Registered User sriky27's Avatar
    Join Date
    Dec 2005
    Posts
    1,236
    Yup there is follow this link
    Regards,
    Sriky

  5. #5
    Regular Contributor ameybarve's Avatar
    Join Date
    Nov 2007
    Location
    Pune, India
    Posts
    94
    Hi sriky27,
    Thanks for your reply.

    In CreateCustomControlL() method i have Created a container which has label control.
    Now the link that you have given shows static definition in resource file, i want to change the controls in custom dialog dynamically and not defined in resource file.
    Can i provide it dynamically?
    Regards,
    Amey

  6. #6
    Registered User sriky27's Avatar
    Join Date
    Dec 2005
    Posts
    1,236
    Hi,

    Check in this link my last post I have attached .h and .cpp how to do it dynamically http://discussion.forum.nokia.com/fo...ghlight=dialog
    Regards,
    Sriky

  7. #7
    Regular Contributor ameybarve's Avatar
    Join Date
    Nov 2007
    Location
    Pune, India
    Posts
    94
    Hi sriky27,

    Thanks again for sharing your code.

    I have created onject of CModalDialog in my AppUi's HandleCommandL() using NewL() method.
    But when i build my code only controls of my container gets displayed. No Editors are displayed.
    Do i need to call any other method of CModalDialog?
    Regards,
    Amey

  8. #8
    Registered User sriky27's Avatar
    Join Date
    Dec 2005
    Posts
    1,236
    You need to call ExecuteLD

    this is the resource you could use

    // ---------------------------------------------------------
    //
    // r_modal_dialog
    // Menu for Modal Dialog View
    //
    // ---------------------------------------------------------
    //
    RESOURCE DIALOG r_modal_dialog
    { flags=EEikDialogFlagWait |EEikDialogFlagFillAppClientRect
    |EEikDialogFlagNoTitleBar|EEikDialogFlagNoDrag|EEikDialogFlagCbaButtons;
    buttons = R_AVKON_SOFTKEYS_OK_EMPTY;
    }


    iModelDialog->ExecuteLD(R_MODAL_DIALoG);
    Regards,
    Sriky

  9. #9
    Regular Contributor ameybarve's Avatar
    Join Date
    Nov 2007
    Location
    Pune, India
    Posts
    94
    Hi sriky27,
    Thanks again.

    I have a question about the code shared by you?
    When will the Draw() method get called? because you have set the Brush color as red but it never gets displayed.

    I tried displaying a text on to dialog using the method you told (dynamic display without using rss structure) and it is being displayed, but now i don't want label to display on dialog, i directly want to use gc.DrawText() method to display text on to dialog, so i have written the code for its display in Draw() method but no text is being displayed on to dialog.
    Regards,
    Amey

  10. #10
    Registered User sriky27's Avatar
    Join Date
    Dec 2005
    Posts
    1,236
    I guess the Edwin are overlapping the text you are drawing try changing the rectangle of edwin so that you have space at the top of the dialog.
    Regards,
    Sriky

  11. #11
    Regular Contributor ameybarve's Avatar
    Join Date
    Nov 2007
    Location
    Pune, India
    Posts
    94
    Hi sriky27,

    I have commented entire code for edwin and then trying to display my text, as i told using Label it is being diaplayed but not using gc.DrawText().
    And i am taking input from user as a text & calling DrawNow() method so that control goes to Draw(), but Draw() does not have any effect.
    Regards,
    Amey

  12. #12
    Registered User sriky27's Avatar
    Join Date
    Dec 2005
    Posts
    1,236
    You are taking user input in a Dialog and you want to update the contents of the Dialog. could you show us the way you are doing it a snapshot of code.
    Regards,
    Sriky

  13. #13
    Regular Contributor ameybarve's Avatar
    Join Date
    Nov 2007
    Location
    Pune, India
    Posts
    94
    Hi sriky27,

    User input is some hard coded string put in _LIT();
    and i want to display it on dialog without using label.
    Regards,
    Amey

  14. #14
    Registered User yogpan's Avatar
    Join Date
    Jun 2006
    Location
    India
    Posts
    1,043
    Hi,
    Can you be more specific where exactly you want to display it on the dialog because you can set it as dialog header or some other place using APIs.
    Maximus
    S60 Developer
    Impossible is nothing

  15. #15
    Registered User sriky27's Avatar
    Join Date
    Dec 2005
    Posts
    1,236
    hi,

    Did you set the rectangle on your label in the PostLayoutDynInitL or any where else I mean sth like iLabel->SetRect( Rect() );
    Regards,
    Sriky

Page 1 of 2 12 LastLast

Similar Threads

  1. Problem with custom dialog
    By esorol in forum Symbian User Interface
    Replies: 1
    Last Post: 2008-04-16, 09:11
  2. custom data query dialog problem
    By pncbose in forum Symbian User Interface
    Replies: 2
    Last Post: 2008-02-25, 04:49
  3. Custom Control in a Dialog
    By wernerkriel in forum Symbian User Interface
    Replies: 7
    Last Post: 2007-11-12, 15:37
  4. Custom dialog is transparent in S60 3rd
    By Holler in forum Symbian User Interface
    Replies: 4
    Last Post: 2007-05-18, 08:47
  5. Custom Listbox in Dialog
    By enjo13 in forum Symbian C++
    Replies: 0
    Last Post: 2007-05-04, 01:35

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved