×

Discussion Board

Results 1 to 2 of 2

Hybrid View

  1. #1
    Regular Contributor
    Join Date
    Oct 2007
    Posts
    64

    How to change position of ScrollBar?

    Hi,

    I set a scrollbar for my listbox like this:

    MyListBoxContainer::ConstructL(const TRect& aRect)
    {
    .....
    iListBox->CreateScrollBarFrameL(ETrue);
    iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto);
    }

    And I change my listbox position like this:

    MyListBoxContainer::SizeChanged()
    {
    iListBox->SetExtent(TPoint(0,100), iListBox->MinimumSize());
    }

    My listbox is not draw at top of container, but listbox vertical scrollbar still draw at top of the container, how could I change scrollbar position to adapt my listbox?

    Thank you!

  2. #2
    Regular Contributor
    Join Date
    Aug 2006
    Location
    Cairo, Egypt
    Posts
    67

    Re: How to change position of ScrollBar?

    use the following code in your parent container SizeChanged
    TInt cY = the Y-Axis of list box;
    iListBox->ScrollBarFrame()->VerticalScrollBar()->SetPosition(TPoint(iListBox->ScrollBarFrame()->VerticalScrollBar()->Position().iX, cY));

Similar Threads

  1. Error position of ScrollBar of listbox
    By yql in forum Symbian C++
    Replies: 2
    Last Post: 2009-06-12, 14:34
  2. listbox wrong scrollbar position
    By koreson in forum Symbian User Interface
    Replies: 7
    Last Post: 2007-01-09, 07:36
  3. How to change scrollbar type with the grid?
    By stevenhotw in forum Symbian C++
    Replies: 0
    Last Post: 2006-09-27, 09:44
  4. Can scrollbar of listbox change height?
    By chingking in forum Symbian User Interface
    Replies: 1
    Last Post: 2006-09-15, 06:29
  5. how to change the size and position of a dialog
    By handle_cn in forum Symbian C++
    Replies: 2
    Last Post: 2004-08-16, 19:46

Posting Permissions

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