×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Jul 2007
    Location
    Noida
    Posts
    1,503

    Problem in showing scroll bar

    Hi experts

    i used following code for scroll bar, that is working fine but in screen scroll bar is not showing, where am i doing wrong?

    Code:
    iDeviceMap = iCoeEnv->ScreenDevice();
    	iNum=4;	// This Number handle scroll down and up counting
    	iScrollBarFrame = new(ELeave) CEikScrollBarFrame(this, this);
    	iScrollBarFrame->SetScrollBarVisibilityL(CEikScrollBarFrame::EOn, CEikScrollBarFrame::EAuto);
    	iScrollBarFrame->SetTypeOfVScrollBar(CEikScrollBarFrame::EDoubleSpan);
    	TRect rect = Rect();
    	iDoubleSpanAttributes.iScrollSpan = iNum;
    	iDoubleSpanAttributes.iThumbSpan = 1;
    	iDoubleSpanAttributes.iThumbPosition = iCurrentScrollNum;
    	
    	TEikScrollBarFrameLayout layout;
    	iScrollBarFrame->TileL(&iHorizModel, &iVertModel, rect, rect, layout);
    	iScrollBarFrame->SetVFocusPosToThumbPos(iVertModel.iThumbPosition);
    	
    	ActivateL();
    	iScrollBarFrame->DrawScrollBarsNow();

    Thanks
    Amit

  2. #2
    Regular Contributor
    Join Date
    Jun 2003
    Location
    Jakarta, Indonesia
    Posts
    164

    Re: Problem in showing scroll bar

    I've use this code below and it works :

    iSBFrame = new(ELeave) CEikScrollBarFrame(this,this,ETrue);
    iSBFrame->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto);
    iSBFrame->CreateDoubleSpanScrollBarsL(ETrue,EFalse);

    TRect rect(Rect());
    rect.iTl.iX=Rect().iBr.iX-iSBFrame->VerticalScrollBar()->DefaultScrollBarBreadth();

    iVModel.iScrollSpan = iCount;
    iVModel.iThumbPosition = iStartPos;
    iVModel.iThumbSpan = iNumOfVisible;

    iSBFrame->Tile(&iVModel,rect);
    iSBFrame->MoveVertThumbTo(iVModel.iThumbPosition);
    iSBFrame->DrawBackground(EFalse,EFalse);
    iSBFrame->DrawScrollBarsNow();

    Where :
    TAknDoubleSpanScrollBarModel iVModel;

    Hope this help .

    Regards,


    Herwin

  3. #3
    Registered User
    Join Date
    Jul 2007
    Location
    Noida
    Posts
    1,503

    Re: Problem in showing scroll bar

    hi

    Here iSBFrame->DrawBackground(EFalse,EFalse);

    i have error taht CEikScrollBarFrame has not DrawBackground member function. i am working os 9.0.

  4. #4
    Registered User
    Join Date
    Jul 2007
    Location
    Noida
    Posts
    1,503

    Re: Problem in showing scroll bar

    but scroll bar is shown here.Thanks

  5. #5
    Regular Contributor
    Join Date
    Jun 2003
    Location
    Jakarta, Indonesia
    Posts
    164

    Re: Problem in showing scroll bar

    IMPORT_C TInt DrawBackground(TBool aDrawHorizontal, TBool aDrawVertical);

    Find in eiksbfrm.h on 9.1 SDK, do not know if this is available or not on 9.0.


    Regards,


    Herwin

Similar Threads

  1. PROGRESS BAR THROUGH ACTIVE OBJECT PROBLEM
    By coxcom in forum Symbian
    Replies: 0
    Last Post: 2006-05-09, 11:05
  2. Creating a Vertical Scroll Bar ?
    By ManoDasa in forum Symbian User Interface
    Replies: 3
    Last Post: 2006-04-27, 14:01
  3. Showing message on status bar
    By korakotc in forum Symbian
    Replies: 0
    Last Post: 2006-03-06, 15:36
  4. Replies: 1
    Last Post: 2006-03-03, 23:57
  5. scroll bar
    By ddhungry in forum Symbian User Interface
    Replies: 3
    Last Post: 2003-05-30, 14:17

Posting Permissions

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