×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Oct 2006
    Posts
    5

    Topology among controls

    Hello.
    I want to draw some control on top of CEikEdwin control.
    I drew two control(CEikLabel, CEikEdwin) in my container and
    I would like to draw the CEikLabel control on top of the CEikEdwin control.
    But the CEikEdwin control was drawn on top of the CEikLabel.
    Please give me a hand how to draw controls above CEikEdwin control.

    I attach my test code and I'm using 3rd Edition.

    Code:
    void CMyContainer::ConstructL(const TRect& aRect)
        {
        CreateWindowL();
    
        iLabel = new (ELeave) CEikLabel;
        iLabel->SetContainerWindowL( *this );
        iLabel->SetTextL(_T("Test"));
    
        iEdwin = new ( ELeave ) CEikEdwin();
        iEdwin->SetContainerWindowL( *this );
        iEdwin->ConstructL(EAknEditorFlagNoT9,0,128,1);
        iEdwin->SetFocus(ETrue);
        iEdwin->SetEdwinObserver(this);
    
        SetRect(aRect);
        
        ActivateL();
        }
    
    CCoeControl* CMyContainer::ComponentControl(TInt aIndex) const
        {
        switch ( aIndex )
            {
            case 0:
                return iEdwin;
            case 1:
                return iLabel;
            default:
                return NULL;
            }
        }
    
    TInt CMyContainer::CountComponentControls() const
        {
        return 2;
        }
    
    void CMyContainer::SizeChanged()
        {
        iEdWin->SetExtent(TPoint(20, 100), TSize(150, 30));
        iLabel->SetExtent(TPoint(10, 100), TSize(200, 50));
        }

  2. #2
    Registered User
    Join Date
    Aug 2003
    Posts
    20

    Re: Topology among controls

    As I see you want to crete a custom dialog without resource file.
    This case you might want to inherit your container from CEikDialog and use the "CreateLineByTypeL" function one after one for your widgets. Note that you should set aCaption to an empty descriptor and aPageId to 0 when creating dynamic dialogs on S60.

    It worth setting the size for each of your dlg lines, e.g.
    ilabel->SetSize(ilabel->MinimumSize());


    Cbc

  3. #3
    Registered User
    Join Date
    Oct 2006
    Posts
    5

    Re: Topology among controls

    Additionally, I inherited CMyContaner from CCoeControl.
    And I would like to overlap two controls in CMyContainer where the label control can be positioned on top of the edit control.
    So the label control must be drawn at the overlapping area of two controls, and each controls must be drawn at the non-overlapping area.

  4. #4
    Registered User
    Join Date
    Aug 2003
    Posts
    20

    Re: Topology among controls

    I'm not sure I understood your needs coorectly.
    If you want two controls to appear on top of each other, you have to place them on different windows.

    Cbc

Similar Threads

  1. Custom controls or extend existing controls?
    By mayur_24 in forum Symbian User Interface
    Replies: 2
    Last Post: 2007-10-05, 16:16
  2. Replies: 2
    Last Post: 2005-03-14, 15:22
  3. dynamic controls in containers
    By entell in forum Symbian
    Replies: 5
    Last Post: 2005-02-18, 18:11
  4. drawing composite controls within CListItemDrawer::DrawActual Item
    By joshd29 in forum Symbian User Interface
    Replies: 1
    Last Post: 2003-08-09, 00:41
  5. MCoeControlObserver .... compound controls
    By asangamneheri in forum Symbian User Interface
    Replies: 1
    Last Post: 2002-08-12, 06:33

Posting Permissions

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