×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    May 2003
    Posts
    19

    Problem about Progress Bar Control

    Hello~

    I have tried the progress bar example in Series 60 SDK.
    And I would like to add a progress bar to my application to test.
    I start from a simple container with no control.

    I have done the following:

    1. Add the following code to ConstructL of my container class
    (CHelloWorldPgbContainer)
    (iPgb is CEikProgressInfo object)
    =========================================
    void CHelloWorldPgbContainer::ConstructL(const TRect& aRect)
    {
    // Create a window for this application view
    CreateWindowL();

    // create progress bar without resource file
    CEikProgressInfo::SInfo info;
    info.iHeight = 20;
    info.iSplitsInBlock = 0;
    info.iTextType = EEikProgressTextNone;
    info.iWidth = 50;
    info.iFinalValue = 50;

    iPgb = new(ELeave) CEikProgressInfo(info);
    iPgb->ConstructL();
    iPgb->SetPosition(TPoint(4, 20));
    iPgb->SetContainerWindowL(*this);

    // Set the windows size
    SetRect(aRect);

    // Activate the window, which makes it ready to be drawn
    ActivateL();
    }
    =========================================

    2. Originally, the container is the simplest and has no control. After
    adding the progress bar, the following is resulted:
    =========================================
    TInt CHelloWorldPgbContainer::CountComponentControls() const
    {
    return 1; // no control
    }
    CCoeControl* CHelloWorldPgbContainer::ComponentControl(TInt /*aIndex*/)
    const
    {
    return iPgb;
    }
    =========================================

    However, the program always get panic at start after I have added the above
    code.
    The same thing happens when I use resource file approach instead of setting
    SInfo in the source code.
    Is there any step I have missed? Could anyone kindly tell me what the
    problem is?
    Thank you very much.

  2. #2
    Regular Contributor
    Join Date
    Jun 2003
    Posts
    50
    Just debug them I think .

  3. #3
    Registered User
    Join Date
    May 2003
    Posts
    19
    I have figured it out.

    The length of the progress bar should follow the example (e.g. 114 or 120). Other lengths may cause error (e.g. 113, 200).

  4. #4
    Regular Contributor
    Join Date
    Mar 2004
    Location
    India
    Posts
    67

    Progress Bar

    Hi tommylkc,
    i have used the code which u have given , but its throwing error on iPgb->ConstructL();
    the error is.. EIKCTL 25


    i m using this code..

    CEikProgressInfo::SInfo info;
    info.iHeight = 20;
    info.iSplitsInBlock = 0;
    info.iTextType = EEikProgressTextNone;
    info.iWidth = 50;
    info.iFinalValue = 50;

    CEikProgressInfo* iPgb = new(ELeave) CEikProgressInfo(info);
    iPgb->ConstructL();
    iPgb->SetPosition(TPoint(4, 20));
    iPgb->SetContainerWindowL(*this);


    could u guide my way through.

    Alok

  5. #5
    Regular Contributor
    Join Date
    Sep 2007
    Posts
    85

    Re: Progress Bar

    Quote Originally Posted by alokkumarsingh View Post
    Hi tommylkc,
    i have used the code which u have given , but its throwing error on iPgb->ConstructL();
    the error is.. EIKCTL 25


    i m using this code..

    CEikProgressInfo::SInfo info;
    info.iHeight = 20;
    info.iSplitsInBlock = 0;
    info.iTextType = EEikProgressTextNone;
    info.iWidth = 50;
    info.iFinalValue = 50;

    CEikProgressInfo* iPgb = new(ELeave) CEikProgressInfo(info);
    iPgb->ConstructL();
    iPgb->SetPosition(TPoint(4, 20));
    iPgb->SetContainerWindowL(*this);


    could u guide my way through.

    Alok

    hi iam strugling for to create progress bar in my application.
    can you send the compleate code like above code. please............

  6. #6
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: Progress Bar


  7. #7
    Regular Contributor
    Join Date
    Sep 2007
    Posts
    85

    Re: Progress Bar

    Quote Originally Posted by symbianyucca View Post
    hai
    thanks for your respanse. i already traied that one .that belong to progress note.

    i also tring the code that alreared there.

    ------------------------------------------------------------------------
    CEikProgressInfo::SInfo info;
    info.iHeight = 20;
    info.iSplitsInBlock = 0;
    info.iTextType = EEikProgressTextNone;
    info.iWidth = 50;
    info.iFinalValue = 50;

    CEikProgressInfo* iPgb = new(ELeave) CEikProgressInfo(info);
    iPgb->ConstructL();
    iPgb->SetPosition(TPoint(4, 20));
    iPgb->SetContainerWindowL(*this);
    ----------------------------------------------------------------------
    send me the code related to this code ..
    Last edited by Bhoopathi Kummara; 2007-10-02 at 08:36.

  8. #8
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: Progress Bar

    if the example didn't help you, then I'm a bit lost, so could you specify what it is actually that you are trying to do ?

    yucca

  9. #9
    Regular Contributor
    Join Date
    Sep 2007
    Posts
    85

    Re: Progress Bar

    Quote Originally Posted by symbianyucca View Post
    if the example didn't help you, then I'm a bit lost, so could you specify what it is actually that you are trying to do ?

    yucca
    i want to create progress bar in my application (in one of view of multiviews app)that is when i switched to view1 to view2, the progress bar have to come automaticaly.for that i am using the code that already sent you.


    I have done the following:

    1. Add the following code to ConstructL of my container class
    (CHelloWorldPgbContainer)
    (iPgb is CEikProgressInfo object)
    =========================================
    void CHelloWorldPgbContainer::ConstructL(const TRect& aRect)
    {
    // Create a window for this application view
    CreateWindowL();

    // create progress bar without resource file
    CEikProgressInfo::SInfo info;
    info.iHeight = 20;
    info.iSplitsInBlock = 0;
    info.iTextType = EEikProgressTextNone;
    info.iWidth = 50;
    info.iFinalValue = 50;

    iPgb = new(ELeave) CEikProgressInfo(info);
    iPgb->ConstructL();
    iPgb->SetPosition(TPoint(4, 20));
    iPgb->SetContainerWindowL(*this);

    // Set the windows size
    SetRect(aRect);

    // Activate the window, which makes it ready to be drawn
    ActivateL();
    }
    =========================================

    2. Originally, the container is the simplest and has no control. After
    adding the progress bar, the following is resulted:
    =========================================
    TInt CHelloWorldPgbContainer::CountComponentControls() const
    {
    return 1; // no control
    }
    CCoeControl* CHelloWorldPgbContainer::ComponentControl(TInt /*aIndex*/)
    const
    {
    return iPgb;
    }
    =========================================

    However, the program always get panic at start after I have added the above
    code.
    The same thing happens when I use resource file approach instead of setting
    SInfo in the source code.
    Is there any step I have missed? Could anyone kindly tell me what the
    problem is?
    Thank you very much.

  10. #10
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: Progress Bar

    OK, what is the panic code ?

    Anyway, would it be easier to just use the progress note, might save you a lots of time, since its readily available at Wiki, and it is tested to be working properly.

    yucca

Posting Permissions

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