×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jan 2008
    Posts
    19

    help! How to limit the character number for CEikEdwin?

    hi all,
    I have tried to use SetMaxLength(TInt alength) and SetTextLimit(TInt alength). but this can not work,
    Is there any other function to be used for? I am very pluzzed!

    BR
    LL

  2. #2
    Nokia Developer Champion
    Join Date
    May 2004
    Posts
    2,266

    Re: help! How to limit the character number for CEikEdwin?

    Hi,

    Please make sure that you are setting the text limit AFTER the edwin's construction (ConstructFromResourceL or ConstructL), i.e. it should be:

    Code:
    // .h
    ...
     CEikEdwin* iInputbox;
    ...
    // .cpp
    ...
    iInputbox = new (ELeave)CEikEdwin;
    iInputbox->SetContainerWindowL(*this); // Create a resource reader that we'll use to get the settings
    TResourceReader reader;
    iEikonEnv->CreateResourceReaderLC(reader, R_INPUTBOX);
    iInputbox->ConstructFromResourceL(reader);
    CleanupStack::PopAndDestroy(); // reader
    iInputbox->SetTextLimit(10);
    ...
    Regards

    Ziteng Chen

  3. #3
    Registered User
    Join Date
    Jan 2008
    Posts
    19

    Re: help! How to limit the character number for CEikEdwin?

    Hi ziteng,
    It works now, I just make a mistake for constructing CEikEdwin.
    Thanks for your help!

    BR
    LL

Similar Threads

  1. CAknTextQueryDialog Number limit
    By sruthimp in forum Symbian User Interface
    Replies: 1
    Last Post: 2007-06-15, 12:45
  2. ERROR RCmake.exe AND rcomp.exe
    By jifik in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2005-10-31, 12:24
  3. Replies: 1
    Last Post: 2004-12-10, 09:32

Posting Permissions

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