×

Discussion Board

Results 1 to 14 of 14
  1. #1
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    4,021

    divide container into two parts

    hi plz anyone tell how to divide a container into two parts, first part with a list box and second with some number of divisions of screen vertically(i mean in second part, there will be seven divisions vertically.)

  2. #2
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: divide container into two parts

    you have to re-size each control to your requirement. or you can create composite control.

  3. #3
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    4,021

    Re: divide container into two parts

    i have tried to resize my list box as:

    iListBox->SetExtent(TPoint(0,0),TSize(250,200));

    but text of list item does not gets compressed , and the focus of a particular item is also not got compresed in that defined area(TSize(250,200)).

  4. #4
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    4,021

    Re: divide container into two parts

    hi how can i draw a line i.e. to make a partition, one side is list box and other side is some text written.
    i know list box is control, so anything drawn will have no effect on container, so i have to resize my control i have tried usinf TSize , but couldn't ..so how can do it

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: divide container into two parts

    It is absolutely not sure that Avkon listboxes are prepared to work in arbitrary sizes.
    For example if you check AknLayoutUtils, you will see
    Quote Originally Posted by SDK Help
    EAColunm Used generally to display small sized graphics or heading texts.
    EBColunm Used generally to display large sized icons or heading texts.
    ECColunm Used generally to display data entered by the user.
    Overlaps with the D column.

    EDColunm Used generally to display additional icons.
    Overlaps with the C column.
    ,indicating that (at least) the horizontal layout of listbox fields can easily happen to be controlled on device level (solely depending on the screen mode, and totally independent from the size you want to set).

  6. #6
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    4,021

    Re: divide container into two parts

    hi wizard..
    im using the following to resize my list box:
    iListBox->SetExtent(TPoint(0,0),TSize(250,250));

    but no use, the text of the items in the list gets hide and focus on an itme is also upto to the end of screen and not confined in the area i mentioned.

    its lik this in the list:

    (xyztyueueue)...scroll bar n then focus bar
    i mean focus is also on item n then scroll bar comes in between n den focus is continued..

  7. #7
    Super Contributor
    Join Date
    Jul 2008
    Location
    Chennai,India
    Posts
    889

    Re: divide container into two parts

    Cud u attach a snapshot of ur appln...since it cud be more xplanatory...

  8. #8
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: divide container into two parts

    Quote Originally Posted by wizard_hu_ View Post
    It is absolutely not sure that Avkon listboxes are prepared to work in arbitrary sizes.
    For example if you check AknLayoutUtils, you will see,indicating that (at least) the horizontal layout of listbox fields can easily happen to be controlled on device level (solely depending on the screen mode, and totally independent from the size you want to set).
    wizard_hu is rightly suspecting that list box might not be resized.

  9. #9
    Super Contributor
    Join Date
    Jul 2008
    Location
    Chennai,India
    Posts
    889

    Re: divide container into two parts

    Ya i m nt saying that resize will work...
    I agree with wizard_hu's comments...

    I wanted to know what is happening when you initially set the size of the listbox to half the screen while listbox construction instead of resizing..
    If that's working we cud make a workaround for this...

  10. #10
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    4,021

    Re: divide container into two parts

    @deepchand:
    i think we set the size of the listbox in sizechanged function n dat is what im doing.

    if i give the following in sizechanged function, den list box is drawn on whole screen

    void CMultiViewsContainer1::SizeChanged()
    {
    iListBox->SetRect(Rect());

    }

  11. #11
    Super Contributor
    Join Date
    Jul 2008
    Location
    Chennai,India
    Posts
    889

    Re: divide container into two parts

    1. Resizing probably won't work according to wizard_hu's suggestions.
    2. But creating a listbox with the desired size shud work..

    To be more specific..if u want to get the desired results..instead of resizing the listbox( i.e if resizing to desired size doesn't work) create the listbox again from scartch with the desired size..

    For ex::
    1. Create a listbox with size( whole screen)..
    2. U want to resize it to half -screen...
    a) Resize(half_screen) not working...
    b) Destroy the existing listbox...create new listbox with size( half_screen)...

    Hope u r getting me.. It may help u...But to be honest i have not tried with half screen but have tried this approach for various sizeChanged() implementations...

  12. #12
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    4,021

    Re: divide container into two parts

    @deepchand , im doing the following to create listbox n sets its size:

    iListBox = new (ELeave) CAknSingleGraphicStyleListBox;
    iListBox->SetContainerWindowL(*this);

    TResourceReader reader;
    CEikonEnv::Static()->CreateResourceReaderLC(reader,R_MARKABLELIST_LISTBOX);
    iListBox->ConstructFromResourceL(reader);
    //iListBox->ConstructL(this, EAknListBoxLoopScrolling | EAknListBoxMarkableList);


    iListBox->CreateScrollBarFrameL(ETrue);
    iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, CEikScrollBarFrame::EOn);
    iListBox->SetFocus(EFalse);
    TRect iMyEditorRect1(TPoint(0,0),TSize(150,1000));
    iListBox->SetRect(iMyEditorRect1);


    CleanupStack::Pop();
    listBoxItems=static_cast<CDesC16Array*>(iListBox->Model()->ItemTextArray());
    AddItem2ListL();

  13. #13
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    4,021

    Re: divide container into two parts

    hey , following is the image o fthe problem, im facing with the sizing of list
    the focus does not gets shift. or resize itself:

    scrollbar is shifted, means list is resized, but not fully, as focus bar is not shifted or confined to resized area
    Last edited by vineet.jain; 2010-03-31 at 09:53.

  14. #14
    Regular Contributor
    Join Date
    Jul 2007
    Location
    Dublin
    Posts
    240

    Re: divide container into two parts

    I had asked same question in http://discussion.forum.nokia.com/fo...d.php?t=151416 , you will find some answers there.
    Basically in ur containers size changed function call SetExtent() for child controls.
    -datha

Similar Threads

  1. Two listbox using the same container
    By ninidotnet in forum Symbian User Interface
    Replies: 1
    Last Post: 2006-05-16, 09:35
  2. View vs. Container
    By mikea1 in forum Symbian
    Replies: 5
    Last Post: 2006-01-12, 09:06
  3. Problem with Container
    By ManishPatil in forum Symbian
    Replies: 2
    Last Post: 2004-02-19, 12:41
  4. Replies: 1
    Last Post: 2003-07-18, 04:05

Posting Permissions

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