×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Sep 2005
    Posts
    10

    Set focus and read-only in CAknMultiLineDataQueryDialog

    I derived new class for CAknMultiLineDataQueryDialog.

    Code:
    class CMyDialog : public CAknMultiLineDataQueryDialog
    {
    public:
    
    	static CMyDialog * NewL(TDes& aText1, TDes& aText2);
    
    private: // From CEikDialog
    
    	void PreLayoutDynInitL();
    	
    private:
    	
    	CMyDialog ();
    };

    Code:
    void CMyDialog ::PreLayoutDynInitL()
    {
    	CEikEdwin* edwin1 = static_cast<CEikEdwin*>(ControlOrNull(EMultilineFirstLine));
    	edwin1->SetReadOnly(ETrue);
    	
    	CEikEdwin* edwin2 = static_cast<CEikEdwin*>(ControlOrNull(EMultilineSecondLine));
    	edwin2->SetReadOnly(ETrue);
    }
    If SetReadOnly(ETrue) is called then i get KERN-EXEC 3 error.

    Fields can be accessed by FirstControl() and SecondControl() which gives CAknMultilineQueryControl. But this class does not allows to set read only flag.

    Code:
    void CMyDialog ::PreLayoutDynInitL()
    {
    	SecondControl()->SetFocus(ETrue);
    	SecondControl()->DrawDeferred();
    }
    SetFocus does not works either. No error occurs, but first edwin is still focus after this code execution.

  2. #2
    Registered User
    Join Date
    Dec 2005
    Location
    Brazil
    Posts
    1,884

    Re: Set focus and read-only in CAknMultiLineDataQueryDialog

    Hi __usr,

    I'm afraid this is the Mobile Java section. You should try the Symbian C++ section instead.

    BR,

    Juarez Junior

  3. #3
    Super Contributor
    Join Date
    Dec 2005
    Location
    Europe/Poland/Warsaw
    Posts
    1,699

    Re: Set focus and read-only in CAknMultiLineDataQueryDialog

    hi __usr,
    to be specific in that section:
    http://discussion.forum.nokia.com/fo...splay.php?f=30
    regards,
    Peter

Similar Threads

  1. Set the label of a CEikComboBox control...
    By GeKI in forum Symbian User Interface
    Replies: 0
    Last Post: 2005-11-08, 09:58
  2. RFID and contactless payment with a Nokia hand set
    By Rodd Bauman in forum General Messaging
    Replies: 0
    Last Post: 2005-06-14, 19:52
  3. PC Connectivity SDK read() can not decode
    By jackyhu in forum PC Suite API and PC Connectivity SDK
    Replies: 1
    Last Post: 2004-12-20, 20:43

Posting Permissions

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