×

Discussion Board

Results 1 to 15 of 15

Hybrid View

  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
    3,956

    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
    3,956

    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
    3,956

    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
    3,956

    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);

Similar Threads

  1. how to display the Listbox
    By arungupta_2jan in forum Symbian C++
    Replies: 4
    Last Post: 2009-03-03, 21:10
  2. Is it possible change the position of query dialog
    By sriramadasu in forum Symbian C++
    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
  •