×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Regular Contributor
    Join Date
    Jul 2003
    Posts
    307

    How to add a border for CEikEdwin?

    Dear All:
    How to add a border for CEikEdwin?
    I have tried function SetBorder(),but it has no effect!
    Thanks in advance!
    Regards!
    Alan Yin

  2. #2
    Registered User
    Join Date
    Sep 2003
    Posts
    4
    6
    Last edited by attila2008; 2003-09-19 at 08:44.

  3. #3
    Registered User
    Join Date
    Sep 2003
    Posts
    4


    try to draw the border in Draw() method, like
    void CtestContainer:raw(const TRect& aRect) const
    {
    CWindowGc& gc = SystemGc();
    gc.SetPenStyle(CGraphicsContext::ENullPen);
    gc.SetBrushColor(KRgbWhite);
    gc.SetBrushStyle(CGraphicsContext::ESolidBrush );
    gc.DrawRect(aRect);

    TGulBorder border;

    gc.SetPenStyle(CGraphicsContext::ESolidPen);
    gc.SetPenColor(KRgbBlack);
    // gc.SetBrushColor(KRgbWhite);
    // gc.SetBrushStyle(CGraphicsContext::ENullBrush );
    border.Draw(gc,TRect(10, 15, 166, 35));
    }


    the answer maybe too late, just for those who have the same question.
    Last edited by attila2008; 2003-09-19 at 08:49.

  4. #4
    Regular Contributor
    Join Date
    Oct 2003
    Location
    England
    Posts
    167

    ceikedwin borders

    I'm afraid it doesnt work, just draw its rect around the control when you draw the view

  5. #5
    Registered User
    Join Date
    Oct 2003
    Posts
    9

    u can try this

    iCEikEdwin = new (ELeave) CEikEdwin(TGulBorder::ESingleGray);

    I used this. And it works fine for me.

  6. #6
    Regular Contributor
    Join Date
    Oct 2003
    Location
    England
    Posts
    167

    weirder and wierder

    Yes, already tried all that in the constructor and by a call to SetBorder() and behold it didnt work. The control is constructed but no border !!!What SDK are you using I'm on S60 SDK v1.2 here

    Wierd eh ?

  7. #7
    Registered User
    Join Date
    Mar 2003
    Posts
    39
    NavaronSoftware:
    TGulBorder:raw () needs _enclosing_ rectangle, so this works correctly:

    CWindowGc& gc = SystemGc();
    TRect rect (iEdwin->Rect());
    rect.Grow(1,1);
    TGulBorder border(iEdwin->Border());
    border.SetType(TGulBorder::ESingleBlack);
    border.Draw (gc, rect);

Posting Permissions

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