×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Nov 2007
    Posts
    31

    Tehnical question about number editor

    Hi all!
    I have few question with number editor
    i create a number editor dialog and when i Run it i have some problems :

    This is dialog:

    CAknNumberQueryDialog* Dialog = CAknNumberQueryDialog::NewL(aNumber,CAknQueryDialog::ENoTone);
    Dialog->PrepareLC(R_CALL_NUMBER_DIALOG);
    TInt ret = Dialog->RunLD();
    if (ret>0){
    // do something .....
    }
    And my questions is :
    1. How change text alignment ?
    2. When in Run it my number is inserted , how change that ?
    3. When dialog run how catch key event ?

    Thanks to all!!

  2. #2
    Registered User
    Join Date
    Nov 2007
    Posts
    31

    Re: Tehnical question about number editor

    i see my question is unique ....

    i create new Number Editor, for my problems but now i have 2 others
    Firstly i don't know how deactivate this , i can change focus but i cannot delete it from window it still visible on screen .
    second problem is in softkey buttons, i don't know how change it , in resourece declaration if i write cba = "" or other function i take error , invalid label.
    RESOURCE NUMBER_EDITOR r_phone_view_num_editor
    {
    max = 9999999999;
    }
    and max number cannot be big 10 symbols , how change this .

    This is my source code :
    iNumEditor->SetContainerWindowL( *this );
    {
    TResourceReader reader;
    iEikonEnv->CreateResourceReaderLC( reader, R_PHONE_VIEW_NUM_EDITOR );
    iNumEditor->ConstructFromResourceL( reader );
    CleanupStack::PopAndDestroy(); // reader internal state
    }
    iNumEditor->SetNumber( 0 );
    iNumEditor->SetMfneAlignment( EAknEditorAlignRight );
    iNumEditor->SetFont( iEikonEnv->AnnotationFont() );

    iNumEditor->SetFocus( ETrue );
    iFocusControl = iNumEditor;
    iNumEditor->SetExtent( TPoint( 6, 171 ), TSize( 225, 47 ) );
    Any ideas will by appreciated.
    thanks

  3. #3
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,737

    Re: Tehnical question about number editor

    Quote Originally Posted by Nicolae View Post
    1. How change text alignment ?
    AVKON_INTEGER_EDWIN apparently does not support any flags.
    2. When in Run it my number is inserted , how change that ?
    I guess you can not, some number is always visible in a number editor.
    3. When dialog run how catch key event ?
    You can inherit your own class from CAknNumberQueryDialog and override its default OfferKeyEventL method.

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,737

    Re: Tehnical question about number editor

    Quote Originally Posted by Nicolae View Post
    Firstly i don't know how deactivate this , i can change focus but i cannot delete it from window it still visible on screen .
    You can try CCoeControl::MakeVisible.
    second problem is in softkey buttons, i don't know how change it , in resourece declaration if i write cba = "" or other function i take error , invalid label.
    From existing examples, you can see that cba can be set to a reference of other resources.
    You can either define your own CBA resource (search for RESOURCE CBA in S[eries]60Ex for some examples), or just use the Avkon-specified ones. You probably already encountered R_AVKON_SOFTKEYS_<SOMETHING>-s, you can find the complete set if you search for some known identifier in epoc32\include.
    and max number cannot be big 10 symbols , how change this .
    Note that a 32-bit signed integer can represent numbers between -2147483648 and 2147483647, these are the limits of NUMBER_EDITOR::max/min, which are LONG-s:
    Quote Originally Posted by eikon.rh
    STRUCT NUMBER_EDITOR
    {
    LONG min;
    LONG max;
    }
    (search for "STRUCT member types" in the SDK Help if you are interested).

Similar Threads

  1. Question regarding number capture
    By utongbullet in forum Symbian
    Replies: 11
    Last Post: 2008-01-11, 11:15
  2. Empty value to number editor?
    By niin in forum Symbian User Interface
    Replies: 2
    Last Post: 2007-05-14, 12:54
  3. How do i specify a default value for a number editor?
    By advocatee in forum Symbian User Interface
    Replies: 5
    Last Post: 2007-05-11, 08:26
  4. WML & WMLSCript problem ????
    By gemini_shooter in forum Browsing and Mark-ups
    Replies: 0
    Last Post: 2006-01-14, 06:02
  5. Personal
    By JSmith77 in forum PersonalJava
    Replies: 4
    Last Post: 2003-07-30, 12:52

Posting Permissions

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