×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Regular Contributor
    Join Date
    Feb 2004
    Posts
    99

    Question Scrollbar in 3rd edition?

    Hi All,

    I am using the scrollbar in 2nd edition using CEikScrollBarFrame ( two triangles in the area between softkeys ). it works fine in 3rd edition also .. but I can see a new scrollbar introduced in 3rd edition. All the native application are using the vertical scrollbar .. like windows .. I am not using that new scrollbar but by default it puts that scrollbar to my container .. any way to handle that scrollbar?


    How can I use the 3rd edition specific scrollbar?


    thanks a lot in advance.

    ..
    KiraN Puranik

  2. #2
    Regular Contributor
    Join Date
    Feb 2004
    Posts
    99

    Angry Re: Scrollbar in 3rd edition?

    Hello All Champs,

    The silence on this topic means no one has tried a Scrollbar on 3rd edition? before few days I ported one of my app from S60 to S80. .. it was converting my triangular scrollbar to Vertical ( windows like ) automatically.

    thanks a lot in advance.

    ..
    KiraN Puranik

  3. #3
    Regular Contributor
    Join Date
    May 2005
    Location
    Brasov, Romania
    Posts
    431

    Re: Scrollbar in 3rd edition?

    It also works this way for 3rd edition

  4. #4
    Regular Contributor
    Join Date
    Feb 2004
    Posts
    99

    Question Re: Scrollbar in 3rd edition?

    Hi,
    Hi,

    Thanks for breaking the silence on this topic. Its not working for me. I can basically see two scrollbars at a time .. one is a Vertical Scrollbar ( windows like ) and other is for triangular ( second edition specific ).

    I am creating it as

    iScrollBar = new (ELeave)CEikScrollBarFrame(this, this, ETrue);

    How can it happen?

    ..
    KiraN Puranik.

  5. #5
    Regular Contributor
    Join Date
    May 2005
    Location
    Brasov, Romania
    Posts
    431

    Re: Scrollbar in 3rd edition?

    It should work...

    Creation:
    Code:
    CreateScrollBar()
    {
    iModel = TEikScrollBarModel();
    iScrollBarFrame = new(ELeave) CEikScrollBarFrame(this, NULL, ETrue);
    iScrollBarFrame->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff /*Auto*/, CEikScrollBarFrame::EAuto);
    iModel.iThumbSpan = 0;
    iModel.iThumbPosition = 0;
    
    iModel.iScrollSpan = totalNrOfLines - maxNrOfVisLines + 1; //you calculate this
    
    iScrollBarFrame->Tile(&iModel);
    iScrollBarFrame->MoveVertThumbTo(iModel.iThumbPosition);
    }
    OfferKeyEvent:
    Code:
    OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType)
    {
    	if(aType == EEventKey)
    	{
    		if (aKeyEvent.iCode == EKeyDownArrow)
    		{
    			if((iModel.iThumbPosition + 1) < iModel.iScrollSpan )
    			{
    				iScrollBarFrame->MoveVertThumbTo(++iModel.iThumbPosition);
    				DrawNow();
    			}
    			return EKeyWasConsumed;
    		}
    
    		if (aKeyEvent.iCode == EKeyUpArrow)
    		{
    			if(iModel.iThumbPosition > 0)
    			{
    				iScrollBarFrame->MoveVertThumbTo(--iModel.iThumbPosition);
    				DrawNow();
    			}
    			return EKeyWasConsumed;
    		}
    
    		iScrollBarFrame->Tile(&iModel);
    		//iScrollBarFrame->DrawScrollBarsNow();
    		iScrollBarFrame->MoveVertThumbTo(iModel.iThumbPosition);
    	}
    	
    	return EKeyWasNotConsumed;
    }

  6. #6
    Regular Contributor
    Join Date
    Feb 2004
    Posts
    99

    Re: Scrollbar in 3rd edition?

    Doing same thing .. But still I can see two seperate scroll bars .. one vertical and other one in between both the CBAs ..

    What can be the problem??? The scroll bar in the right side is just sitting .. not doing anything .. the other guy doing work .. seems very strange.

    Do I need to set any specific flag for it ? to get the Right hand side Windows like Scrollbar?????

    thanks a lot in advance.

    ..
    KiraN Puranik

  7. #7
    Regular Contributor
    Join Date
    May 2005
    Location
    Brasov, Romania
    Posts
    431

    Re: Scrollbar in 3rd edition?

    Try to destroy thet scrollbar first...

  8. #8
    Regular Contributor
    Join Date
    Feb 2004
    Posts
    99

    Lightbulb Re: Scrollbar in 3rd edition?

    Hi,

    I removed SetMopParent from my view .. now the old scrollbar ( triangle bet CBAs ) is not appearing. Now I have only single scrollbar appearing on Right side .. but that is not being handled ..

    thanks a lot.

    ..
    KiraN Puranik

  9. #9
    Regular Contributor
    Join Date
    Jan 2004
    Posts
    128

    Talking Re: Scrollbar in 3rd edition?

    I have used the code showed above and I can see the scroll bar between my CBA buttons in my 3rd Edition phone. However I am more interested on the vertical scroll bar? What Should I do?
    Last edited by ferranhalden; 2007-03-16 at 10:57.

  10. #10
    Registered User
    Join Date
    Jan 2004
    Location
    The surburbs of Bangkok, Thailand
    Posts
    135

    Re: Scrollbar in 3rd edition?

    I'm not so sure if this is relevant or not, but for my case I wanted to show a vertical scroll bar in my CEikRichTextEditor and I did as follows:

    The reason for this problem in my CEikRichTextEditor would probably be as described in the "S60_Platform_Rich_Text_Editor_Example_v2_0_en" as:
    //In 3rd edition CEikRichTextEditor draw the view for the whole rect and
    //the scrollbar doesn't show. That is a reason why CEikRichTextEditor Width() is
    //rect.Width()-ScrollBarRect.Width()

    I solved my problem using this code - it was modified from the "S60_Platform_Rich_Text_Editor_Example_v2_0_en" example.

    1. Try implement your container's SizeChanged() function like this:

    void CYourRichTextContainer::SizeChanged()
    {
    TRect rect = Rect();


    #ifdef __SERIES60_3X__
    TRect ScrollBarRect = iEditor->ScrollBarFrame()->VerticalScrollBar()->Rect();
    iEditor->SetExtent(TPoint(0,0),
    TSize(rect.Width()-ScrollBarRect.Width(), rect.Height()));
    #else
    iRtEd->SetExtent(TPoint(0,StatusLineHeight),
    TSize(rect.Width(), rect.Height()-StatusLineHeight));
    #endif
    }


    Note: "iEditor" is my CEikRichTextEditor object pointer.


    2. Call SizeChanged() at the end of your container's ConstructL()

    Hope this helps...
    Last edited by ykasidit; 2007-04-30 at 11:36.
    Liberate yourself from the enslavement of World Monopoly!

Similar Threads

  1. Linking dll in S60 3rd edition - experts please help!
    By iulian_moldovan in forum Symbian Tools & SDKs
    Replies: 7
    Last Post: 2007-06-13, 18:41
  2. make sis on symbian 3rd edition
    By Rx-lee in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2006-06-27, 00:37
  3. Carbide C++ AppWizards for 3rd Edition
    By ArneH in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 2006-05-20, 21:22
  4. Plea for Link Errors:Porting Code from Fp3 to 3rd Edition
    By mateen_maldar in forum Symbian User Interface
    Replies: 3
    Last Post: 2006-05-17, 06:26
  5. TTime : TInt64& Int64() problem in S60 3rd edition
    By iulian_moldovan in forum Symbian Tools & SDKs
    Replies: 3
    Last Post: 2006-01-24, 13:07

Posting Permissions

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