×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Regular Contributor
    Join Date
    Apr 2008
    Posts
    309

    Smile question about the HorizontalScrollBar()

    Thanks a lot.
    Last edited by liuxingyu_best; 2009-01-06 at 11:09.

  2. #2
    Super Contributor
    Join Date
    Jul 2007
    Posts
    596

    Re: question about the HorizontalScrollBar()

    Quote Originally Posted by liuxingyu_best View Post
    Hello,

    I want to add a horizontal scrollbar to a textlistbox, I use the
    iTextListBox ->ScrollBarFrame() ->HorizontalScrollBar(), but a error appers: "Undefined symbol: 'class CEikScrollBar * CEikScrollBarFrame::HorizontalScrollBar(void) const" I doubt that it is the link error. please tell me which libray need I add?

    thank you
    For this kind of thing it is better to search in your sdk help
    anyway have u included #include <eiksbfrm.h>

    link against eikcoctl.lib


    Thanks

  3. #3
    Regular Contributor
    Join Date
    Apr 2008
    Posts
    309

    Smile Re: question about the HorizontalScrollBar()

    Thanks a lot.
    Last edited by liuxingyu_best; 2009-01-06 at 11:09.

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

    Re: question about the HorizontalScrollBar()

    Indeed, if you check
    Quote Originally Posted by eiksbfrm.h
    CEikScrollBar* HorizontalScrollBar() const;
    this method is neither inline, nor imported. It can not be used.

  5. #5
    Super Contributor
    Join Date
    Jul 2007
    Posts
    596

    Re: question about the HorizontalScrollBar()

    Quote Originally Posted by wizard_hu_ View Post
    Indeed, if you checkthis method is neither inline, nor imported. It can not be used.
    can u explain what does it mean Is this api is not available now???....

    I have tested CEikScrollBar* VerticalScrollBar() const; which works fine but horizontalscrollbar......

    Thanks

  6. #6
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,749

    Re: question about the HorizontalScrollBar()

    Since the method-name "HorizontalScrollBar" does not appear in any .lib of the SDK, it can not be used. (The word itself appears, since avkon.lib exports AknLayoutUtils::LayoutHorizontalScrollBar)

  7. #7
    Registered User
    Join Date
    Feb 2011
    Posts
    338

    Re: question about the HorizontalScrollBar()

    Quote Originally Posted by wizard_hu_ View Post
    Since the method-name "HorizontalScrollBar" does not appear in any .lib of the SDK, it can not be used. (The word itself appears, since avkon.lib exports AknLayoutUtils::LayoutHorizontalScrollBar)
    I am using a CEikScrollbar frame and it has a horizontal scrollbar. I am facing problem using the scrollbar. Can I access that particular scrollbar anyway?
    Thank you.

  8. #8
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,749

    Re: question about the HorizontalScrollBar()

    Quote Originally Posted by Md. Kayesh View Post
    I am using a CEikScrollbar frame and it has a horizontal scrollbar. I am facing problem using the scrollbar. Can I access that particular scrollbar anyway?
    Thank you.
    Has it? Or is it supposed to have?
    I can not recall seeing "stock" horizontal scrollbars on S60/Symbian^3 from the last 3 years either.

  9. #9
    Registered User
    Join Date
    Feb 2011
    Posts
    338

    Re: question about the HorizontalScrollBar()

    The following code shows both horizontal and vertical scroll bar:
    Code:
        iScrollBarFrame = new ( ELeave ) CEikScrollBarFrame( this, NULL );
        iScrollBarFrame->CreateDoubleSpanScrollBarsL( ETrue, EFalse );
        iScrollBarFrame->SetTypeOfVScrollBar( CEikScrollBarFrame::EDoubleSpan );
        iScrollBarFrame->SetTypeOfHScrollBar( CEikScrollBarFrame::EDoubleSpan );
        iScrollBarFrame->SetScrollBarVisibilityL( CEikScrollBarFrame::EOn, CEikScrollBarFrame::EOn );
        TRect aRect(Rect());    	
        TAknDoubleSpanScrollBarModel          iHDsSbarModel;
        TAknDoubleSpanScrollBarModel          iVDsSbarModel;        
        TInt                                  iFocusedIndex(1);
        iVDsSbarModel.SetScrollSpan(span);    
        iVDsSbarModel.SetWindowSize(1);
        iVDsSbarModel.SetFocusPosition(iFocusedIndex);
        span = bodyHeight - aRect.Height();    
        iHDsSbarModel.SetScrollSpan(span);    
        iHDsSbarModel.SetWindowSize(1);
        iHDsSbarModel.SetFocusPosition(iFocusedIndex);    
        TEikScrollBarFrameLayout layout;
        layout.iTilingMode = TEikScrollBarFrameLayout::EInclusiveRectConstant;
        TRect aRect3(TRect(Rect().iTl, TSize(aRect.Width(), aRect.Height())));    
        TRect rect = aRect3;
        iScrollBarFrame->TileL(&iHDsSbarModel,&iVDsSbarModel,rect,rect,layout);    
        iScrollBarFrame->SetVFocusPosToThumbPos(iVDsSbarModel.FocusPosition());
       
        iScrollBarFrame->SetScrollBarFrameObserver(this);	
        aRect3 = TRect(Rect().iTl, TSize(aRect.Width(), aRect.Height()));
        rect = aRect3;    
        iScrollBarFrame->TileL(&iHDsSbarModel,&iVDsSbarModel,rect,rect,layout);
    Inside the function:
    Code:
    	virtual void HandleScrollEventL(CEikScrollBar* aScrollBar, TEikScrollEvent aEventType);
    I get the access of horizontal scrollbar for example the thumbposition of the scrollbar using
    Code:
    TInt posY = aScrollBar->ThumbPosition();//for vertical event
    TInt posX = aScrollBar->ThumbPosition();//for horizontal event
    So I am confused why the following function is made?
    Code:
    TInt posX = iScrollBarFrame->HorizontalScrollBar()->ThumbPosition()
    Is it a mistake? This function seems to be useless :(

    Thank you.

Similar Threads

  1. N81 BUG: Web Services Parser an question marks???
    By masterchief2004 in forum Mobile Java General
    Replies: 1
    Last Post: 2008-03-07, 17:59
  2. a question about command and a question about s60
    By t4kesting in forum Mobile Java General
    Replies: 0
    Last Post: 2006-01-24, 08:21
  3. Replies: 2
    Last Post: 2004-01-08, 18:36
  4. Sending data using iAcceptedSocket (Urgent question)
    By okegame in forum Bluetooth Technology
    Replies: 1
    Last Post: 1970-01-01, 02:00

Posting Permissions

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