×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Feb 2005
    Posts
    328

    Exclamation Full screen listbox skin not rendered correctly

    Seeking help! My full-screen listbox does not correctly render the background skin. When I set the rect of the Listbox to the full screen size (no status pane), then the listbox works, but the background skin of the listbox does not render the full region, but stops short at the bottom of the listbox leaving a "white bar" under the last 2 elements of the visible list.

    How do I tell the skin behind the listbox that it has changed size? Help! Anyone?

    I have seen the post http://discussion.forum.nokia.com/fo...screen+listbox
    ... but thought I would add my code in a new post...

    To get my listbox to display in the full screen mode, I hide the status bar as follows in my view class:

    void CFullScreenListView:oActivateL(
    const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
    const TDesC8& /*aCustomMessage*/)
    {
    if (iContainer == NULL)
    {
    // hide status pane
    CEikStatusPane* sp= StatusPane();
    sp->MakeVisible(EFalse);

    // new search view
    iContainer = CFullScreenListContainer::NewL();
    iContainer->SetMopParent(this);
    AppUi()->AddToStackL(*this, iContainer);
    }
    }

    And here is the code for my listbox:

    // includes
    #include <aknlists.h>
    #include <aknsfld.h>
    #include <eikclbd.h>
    #include "CFullScreenListContainer.h"


    CFullScreenListContainer* CFullScreenListContainer::NewL()
    {
    CFullScreenListContainer* self = new(ELeave) CFullScreenListContainer();
    CleanupStack::PushL(self);
    self->constructL();
    CleanupStack::Pop(self);
    return self;
    }

    CFullScreenListContainer::CFullScreenListContainer()
    {
    }

    void CFullScreenListContainer::constructL()
    {
    CreateWindowL();
    SetRect(CEikonEnv::Static()->EikAppUi()->ClientRect());

    // create listbox
    iListbox = new(ELeave) CAknSingleGraphicStyleListBox;
    iListbox->SetContainerWindowL(*this);
    iListbox->SetMopParent(this);
    iListbox->ConstructL(this, 0);
    iListbox->SetRect(Rect());
    iListbox->CreateScrollBarFrameL(ETrue);
    iListbox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto);
    iListbox->ActivateL();
    iListbox->SetFocus(ETrue);
    iListbox->ItemDrawer()->ColumnData()->SetIconArray(newIconArrayL());

    // create findbox
    iFindbox = createFindBoxL(iListbox, iListbox->Model(), CAknSearchField::ESearch);
    iFindbox->MakeVisible(ETrue);
    iFindbox->ActivateL();
    iFindbox->DrawNow();

    SizeChanged();
    ActivateL();
    }

    CFullScreenListContainer::~CFullScreenListContainer()
    {
    delete iFindbox;
    delete iListbox;
    }

    CAknSearchField* CFullScreenListContainer::createFindBoxL(CEikListBox* aListBox,
    CTextListBoxModel* aModel,
    CAknSearchField::TSearchFieldStyle aStyle)
    {
    CAknSearchField* findbox = NULL;
    if (aListBox && aModel)
    {
    CAknFilteredTextListBoxModel* model;
    model = static_cast<CAknFilteredTextListBoxModel*>(aModel);
    findbox = CAknSearchField::NewL(*this, aStyle, NULL, 8);
    CleanupStack::PushL(findbox);
    model->CreateFilterL(aListBox, findbox);
    CleanupStack::Pop(findbox);
    }
    return findbox;
    }

    TInt CFullScreenListContainer::CountComponentControls() const
    {
    return 2;
    }

    CCoeControl* CFullScreenListContainer::ComponentControl(TInt aIndex) const
    {
    switch (aIndex)
    {
    case 0:
    return iListbox;
    case 1:
    return iFindbox;
    }
    return NULL;
    }

    TKeyResponse CFullScreenListContainer::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType)
    {
    if (iFindbox != NULL)
    {
    TBool needRefresh(EFalse);
    if (AknFind::HandleFindOfferKeyEventL(aKeyEvent, aType, this, iDummyListbox, iFindbox,
    ETrue, needRefresh) == EKeyWasConsumed)
    {
    if (needRefresh)
    {
    AknFind::HandleFixedFindSizeChanged(this, iListbox, iFindbox);
    DrawNow();
    }
    return EKeyWasConsumed;
    }
    }

    return iListbox->OfferKeyEventL(aKeyEvent, aType);
    }

    void CFullScreenListContainer::SizeChanged()
    {
    if (iListbox != NULL)
    {
    iListbox->SizeChanged();
    if (iFindbox != NULL)
    {
    AknFind::HandleFixedFindSizeChanged(this, iListbox, iFindbox);
    }
    }
    }

    void CFullScreenListContainer::HandleResourceChange(TInt aType)
    {
    CCoeControl::HandleResourceChange(aType);
    if (aType == KEikDynamicLayoutVariantSwitch)
    {
    // handle layout change
    SetRect(iView.ClientRect());
    iListbox->SetRect(Rect());
    }
    }

  2. #2
    Regular Contributor
    Join Date
    Mar 2005
    Location
    Mumbai
    Posts
    212

    Re: Full screen listbox skin not rendered correctly

    Hi,

    Were you able to solve the problem.

  3. #3
    Regular Contributor
    Join Date
    Jun 2007
    Location
    Jakarta, Indonesia
    Posts
    269

    Smile Re: Full screen listbox skin not rendered correctly

    Hi template60


    What is the Rect() value in your CoeControl class? Is it the correct size you wanted? Maybe you should try giving the size manually to the listbox using listbox->SetExtent(). Just try it out


    Cheers..

Similar Threads

  1. skin not displayed in custom listbox....
    By Neelakantan in forum Symbian User Interface
    Replies: 10
    Last Post: 2010-06-20, 09:14
  2. display an image in full screen
    By letronje in forum Symbian Media (Closed)
    Replies: 5
    Last Post: 2007-01-31, 05:00
  3. UI: Full Screen Mode
    By GENERAL_INFO in forum Symbian User Interface
    Replies: 3
    Last Post: 2004-11-22, 06:27
  4. Pausing/resuming full screen midlet
    By dubick in forum Mobile Java General
    Replies: 0
    Last Post: 2002-11-15, 11:03
  5. how to make a full screen window?
    By Nokia_Archive in forum Symbian User Interface
    Replies: 1
    Last Post: 2002-05-29, 15:30

Posting Permissions

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