×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Sep 2003
    Location
    Ukraine
    Posts
    74

    HELP! ScrollBars and ListBox

    I have:

    // class myclass : public CCoeControl

    iListBox = new (ELeave) CAknSingleGraphicStyleListBox;
    iListBox->ConstructL(this,EAknListBoxMultiselectionList);
    iListBox->SetContainerWindowL(*this);

    //Append Items

    iListBox->CreateScrollBarFrameL(ETrue);
    iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOn,CEikScrollBarFrame::EAuto);
    iListBox->SetRect(Rect());
    iListBox->ActivateL();

    But ScrollBar is invisible. Whats wrong?
    Thanks.

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167
    did you remember to set the SetMopParent() for your container class.

    yucca

  3. #3
    Regular Contributor
    Join Date
    Sep 2003
    Location
    Ukraine
    Posts
    74
    //class myView: public CAknView
    ...
    iContainer = myclass::NewL(ClientRect(), this);
    iContainer->SetMopParent(this);
    AppUi()->AddToStackL(iContainer);
    ....

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167
    Hi

    check the UpdateScrollBar() function from the examples and add it after the ActivateL() function.

    Also, dunno really does if make any difference, but usually I use
    AppUi()->AddToStackL( *this,iContainer) when adding the container to the stack.

    yucca

  5. #5
    Regular Contributor
    Join Date
    Sep 2003
    Location
    Ukraine
    Posts
    74
    Thank you! Now problem is solved.

Posting Permissions

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