×

Discussion Board

Results 1 to 15 of 15
  1. #1
    Super Contributor
    Join Date
    Jun 2008
    Posts
    593

    Smile change the position of a listbox...

    hi..

    i have made the status pane invisible in my view.. as i want my own image in the header portion..

    but den, the listbox by default appears from the top (status pane)..
    & leaves some blank white space in the bottom b4 the cba pane..

    so i m using this code in LayoutControls...
    Code:
    iListBox->SetExtent( TPoint(0,50), iListBox->MinimumSize());
    now it starts the listbox from the client Area.. but still leaves the same amt of white space in the bottom... i.e the listbox seems to shrink...

    how can i overcome this...

    Thanks
    Nital

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

    Re: change the position of a listbox...

    try this:
    TPoint coordListBox;

    AknLayoutUtils::LayoutMetricsPosition(AknLayoutUtils::EMainPane, coordListBox);
    iListBox->SetExtent(coordListBox, TSize(iListBox->MinimumSize());

    in your sizechanged()

  3. #3
    Super Contributor
    Join Date
    Jun 2008
    Posts
    593

    Re: change the position of a listbox...

    Quote Originally Posted by vineet.jain View Post
    try this:
    TPoint coordListBox;

    AknLayoutUtils::LayoutMetricsPosition(AknLayoutUtils::EMainPane, coordListBox);
    iListBox->SetExtent(coordListBox, TSize(iListBox->MinimumSize());

    in your sizechanged()
    Thanks Vineet for replying..

    i tried yr code...
    the Listbox starts from the Main Pane...
    but it shrinks & leaves some space in the background..

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

    Re: change the position of a listbox...

    i think you need to do some calculations to set the size of your listbox.You can try something like: Calculate the net height of your window i.e. application rect & subtract from it the height of status pane,the height which you will get , set that height as height of listbox in the TSize()

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

    Re: change the position of a listbox...

    ok try this:

    TRect rect;

    height = rect.Height();
    width = rect.Width();
    iListBox->SetExtent(coordListBox, TSize(width,height));

    in the sizechnaged()

  6. #6
    Super Contributor
    Join Date
    Jun 2008
    Posts
    593

    Unhappy Re: change the position of a listbox...

    i have tried all these things...

    i have attached some screen shots.. which wil help u understand my problem..

    however big TSize i provide, but the listbox is drawn only till a particular defined limit..
    Attached Images Attached Images

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

    Re: change the position of a listbox...

    ok fine, tel me is it possible for you to decrease the size of status pane rather than removing it?
    i mean you can try decreasing the size of it as in AppUi's constructL()

    CEikStatusPane* sp = StatusPane();
    sp->SwitchLayoutL(R_AVKON_STATUS_PANE_LAYOUT_SMALL);

  8. #8
    Super Contributor
    Join Date
    Jun 2008
    Posts
    593

    Re: change the position of a listbox...

    Quote Originally Posted by vineet.jain View Post
    ok fine, tel me is it possible for you to decrease the size of status pane rather than removing it?
    i mean you can try decreasing the size of it as in AppUi's constructL()

    CEikStatusPane* sp = StatusPane();
    sp->SwitchLayoutL(R_AVKON_STATUS_PANE_LAYOUT_SMALL);
    no..
    i have to completely remove it..
    the whole screen's background has to b the same.. (a predecideed image)..

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

    Re: change the position of a listbox...


  10. #10
    Super Contributor
    Join Date
    Jun 2008
    Posts
    593

    Re: change the position of a listbox...

    Quote Originally Posted by vineet.jain View Post
    yes..
    gives same result.. no luck

  11. #11
    Super Contributor
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034

    Re: change the position of a listbox...

    AFAIK SetExtent() will not help you in anyway. It will set controls (your listbox) position and size with respect to associated windows. If you want to show image/message above list items then one way is to use fullscreen application.

  12. #12
    Super Contributor
    Join Date
    Jun 2008
    Posts
    593

    Smile Re: change the position of a listbox...

    Quote Originally Posted by savaj View Post
    AFAIK SetExtent() will not help you in anyway. It will set controls (your listbox) position and size with respect to associated windows. If you want to show image/message above list items then one way is to use fullscreen application.
    hi...
    can u plz elaborate..
    i already tried following this link.. but dint succeed..

  13. #13
    Super Contributor
    Join Date
    Jun 2008
    Posts
    593

    Smile Re: change the position of a listbox...

    Quote Originally Posted by vineet.jain View Post
    ok fine, tel me is it possible for you to decrease the size of status pane rather than removing it?
    i mean you can try decreasing the size of it as in AppUi's constructL()

    CEikStatusPane* sp = StatusPane();
    sp->SwitchLayoutL(R_AVKON_STATUS_PANE_LAYOUT_SMALL);
    hey vineet..

    thannks a lott for this solution..
    m using this to minimize the status pane.. & putting an image on it
    so dat it looks unifor wid the rest of the screen...

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

    Re: change the position of a listbox...

    nital, also try this:

    statuspane->SwitchLayoutL(R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT );

  15. #15
    Super Contributor
    Join Date
    Jun 2008
    Posts
    593

    Smile Re: change the position of a listbox...

    Quote Originally Posted by vineet.jain View Post
    nital, also try this:

    statuspane->SwitchLayoutL(R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT );
    ya..
    but for me.. previous solution is better..

Similar Threads

  1. how to display the Listbox
    By arungupta_2jan in forum Symbian
    Replies: 4
    Last Post: 2009-03-03, 21:10
  2. Is it possible change the position of query dialog
    By sriramadasu in forum Symbian
    Replies: 2
    Last Post: 2008-10-30, 07:53
  3. how to change the color of the Highlight item in the listbox
    By RaveendraB in forum Symbian User Interface
    Replies: 8
    Last Post: 2008-02-28, 17:49
  4. Replies: 2
    Last Post: 2005-07-20, 14:17
  5. change font size on listbox and load image as foreground
    By cindul in forum Symbian Media (Closed)
    Replies: 0
    Last Post: 2005-02-19, 03:56

Posting Permissions

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