×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Nov 2009
    Posts
    56

    CBrCtlInterface bug?

    Hi,
    I add a CBrCtlInterface object. When i set the position of it with SetRect according to the container window, it's not being positioned correctly, having a margin same size as the rect inside? Is this a bug or has a solution? Thanks.


  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,694

    Re: CBrCtlInterface bug?

    What do you SetRect exactly?
    If it is a ConstructL thing, and you are using some argument for SetRect-ing the container and the browser control, note that child controls have relative coordinates to their container.
    This is why Rect returns the SetRect-ed rectangle moved to 0,0, allowing comfortable use in SizeChanged - the better place for sizing child controls.

  3. #3
    Registered User
    Join Date
    Nov 2009
    Posts
    56

    Re: CBrCtlInterface bug?

    I just use:

    iBrCtlInterface->SetRect(aClientRect);

    after creating the browser control inside the container.

    iBrCtlInterface = CreateBrowserControlL(this,
    TRect(TPoint(0, 0), TSize(0, 0)),
    TBrCtlDefs::ECapabilityDisplayScrollBar | TBrCtlDefs::ECapabilityLoadHttpFw |
    TBrCtlDefs::ECapabilityGraphicalHistory | TBrCtlDefs::ECapabilityGraphicalPage,
    iCommandBase}

    If i send the rectangle to CreateBrowserControlL method as an argument, no changes? Browser only works for (0, 0) position.

    I found this thread about this, but didn't work for me:

    http://discussion.forum.nokia.com/fo...ject-correctly

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

    Re: CBrCtlInterface bug?

    Yes, this is what I was trying to describe.
    Let us say, aClientRect is located at 50,50. If you invoke SetRect on your container, that is going to be positioned at 50,50 on the screen.
    Now if you create a child control, and pass the same rectangle to its SetRect, it is going to be located at 50,50 inside your container. Which is 100,100 on the screen.
    As a minimum you should
    Code:
    iBrCtlInterface->SetRect(TRect(TPoint(0,0),aClientRect.Size()));
    however the normal approach would be SetRect-ing yourself only in ConstructL, and do the rest in SizeChanged
    Code:
    SizeChanged()
    {
        iBrCtlInterface->SetRect(Rect());
    }

  5. #5
    Registered User
    Join Date
    Nov 2009
    Posts
    56

    Re: CBrCtlInterface bug?

    But I don't position my container at (50, 50). It SetRect-ed with the ClientRect() of AppUi which is (0, 0) - (360, 640). I'm just changing the rect of Browser control. As you can see in the screenshot, I'm setting it's rect to (30, 60) and there is another (30, 60) until content is shown. White area of browser control starts at desired position (30, 60).

    If you can look at the BrowserControl example in 5th SDK you will see the problem. In Symbian ^3 sdk example, problem continues but they placed the control at (0, 0).

  6. #6
    Registered User
    Join Date
    Dec 2006
    Location
    Noida, India
    Posts
    150

    Re: CBrCtlInterface bug?

    I am facing the same issue.. Did you found any solution??

Similar Threads

  1. is this a program bug or a bug in python?
    By arnab321 in forum Symbian
    Replies: 1
    Last Post: 2011-03-08, 11:10
  2. is CBrCtlInterface bug?
    By linzhiji in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2010-05-06, 02:44
  3. CBrCtlInterface
    By liao_jinhua@163.com in forum Symbian
    Replies: 0
    Last Post: 2009-08-03, 09:44
  4. Bug or not Bug with Nokia 6170 : Network problem
    By mouldnadif in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2005-02-24, 14:31
  5. Firmware bug or code bug displaying list on 3650
    By blackjack75 in forum Mobile Java General
    Replies: 2
    Last Post: 2003-09-24, 19: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
  •  
×