Discussion Board

Results 1 to 10 of 10

Thread: Form fields

  1. #1
    Registered User sumit.rathi's Avatar
    Join Date
    Jun 2008
    Location
    India
    Posts
    1,048
    Hi all,

    I am making FORM with multiple text edwin. It's working perfectly but i want to set some text before opening of form.I want it to be displayed whenever it is opened.But it's not happening. Can anybody help me in doing this?

    I want to know can i show default values in a form?
    Last edited by sumit.rathi; 2009-06-22 at 12:45.

  2. #2
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    27,747
    Where have you tried that? PostLayoutDynInitL is a good location for example.

  3. #3
    Registered User sumit.rathi's Avatar
    Join Date
    Jun 2008
    Location
    India
    Posts
    1,048
    Quote Originally Posted by wizard_hu_ View Post
    Where have you tried that? PostLayoutDynInitL is a good location for example.
    i tried implementation using opponent form example.I want to set the edwin values before the opening of form. Is it possible?
    Last edited by sumit.rathi; 2009-06-22 at 14:02.

  4. #4
    Registered User sumit.rathi's Avatar
    Join Date
    Jun 2008
    Location
    India
    Posts
    1,048
    hi all

    Can we set default values to a form?
    Last edited by sumit.rathi; 2009-06-22 at 14:06.

  5. #5
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    27,747
    Yes, we can. For example in PostLayoutDynInitL, as I have suggested already.

  6. #6
    Regular Contributor assayag's Avatar
    Join Date
    Jun 2008
    Posts
    213
    In your container construcL function after calling ActivateL you can write your own function to set font/text etc...

  7. #7
    Regular Contributor sunil.shetty's Avatar
    Join Date
    Feb 2007
    Location
    Mumbai
    Posts
    67
    SetEdwinTextL(TInt aControlId,const TDesC* aDes) should do the job for u..

  8. #8
    Registered User sumit.rathi's Avatar
    Join Date
    Jun 2008
    Location
    India
    Posts
    1,048
    Quote Originally Posted by sunil.shetty View Post
    SetEdwinTextL(TInt aControlId,const TDesC* aDes) should do the job for u..
    Still not able to set default values to form editors even using this function. Is there any example? how to do this?

  9. #9
    Regular Contributor sunil.shetty's Avatar
    Join Date
    Feb 2007
    Location
    Mumbai
    Posts
    67
    void CMyForm::PreLayoutDynInitL()
    {

    CAknForm::PreLayoutDynInitL();

    CEikEdwin* formField1 = static_cast <CEikEdwin*> (ControlOrNull(EIdEdwin01));
    if (formField1)
    {
    formField1->SetTextL(KField1());
    }

    CEikEdwin* formField2 = static_cast <CEikEdwin*> (ControlOrNull(EIdEdwin02));
    if (formField2)
    {
    formField2->SetTextL(KField2());
    }

    .........................
    ........................


    }


    Hope this helps

  10. #10
    Registered User sumit.rathi's Avatar
    Join Date
    Jun 2008
    Location
    India
    Posts
    1,048
    Quote Originally Posted by sunil.shetty View Post
    void CMyForm::PreLayoutDynInitL()
    {

    CAknForm::PreLayoutDynInitL();

    CEikEdwin* formField1 = static_cast <CEikEdwin*> (ControlOrNull(EIdEdwin01));
    if (formField1)
    {
    formField1->SetTextL(KField1());
    }

    CEikEdwin* formField2 = static_cast <CEikEdwin*> (ControlOrNull(EIdEdwin02));
    if (formField2)
    {
    formField2->SetTextL(KField2());
    }

    .........................
    ........................


    }


    Hope this helps
    Nopes. It will not work. well, thanks for co-operation. I have solved the problem.
    Thanks Wizard .

Similar Threads

  1. Form troubles
    By matdodgson in forum Symbian User Interface
    Replies: 2
    Last Post: 2008-12-06, 10:49
  2. Replies: 15
    Last Post: 2008-07-14, 12:38
  3. problem with editing[dim] different fields in a form
    By lavanya kartheek in forum General Development Questions
    Replies: 0
    Last Post: 2008-04-22, 13:33
  4. Compare value between fields in a form
    By ninidotnet in forum Symbian User Interface
    Replies: 1
    Last Post: 2006-08-18, 09:56
  5. Replies: 2
    Last Post: 2003-07-16, 15:47

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