×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Jan 2006
    Posts
    279

    Smaller icons in my listbox?

    I have a CAknSingleLargeStyleListBox and I have several .mif icons.
    I would like to scale the icons myself, so I use for example
    Code:
    AknIconUtils::SetSize( newIcon->Bitmap(), TSize( 10, 10 ), EAspectRatioPreserved );
    But it seems that the listbox scales them to some different size (the size of the column), disregarding my size and sets its own.
    What should I do?
    Thanks!

  2. #2
    Super Contributor
    Join Date
    Jul 2007
    Location
    Beijing, China
    Posts
    538

    Re: Smaller icons in my listbox?

    list box won't resize icon unless icon's size is not set(or successfully set)

  3. #3
    Super Contributor
    Join Date
    Jan 2008
    Location
    Bangalore, India
    Posts
    777

    Re: Smaller icons in my listbox?

    As i know,there is no need to resize the icon.for more u can look on this thread,
    http://discussion.forum.nokia.com/fo...d.php?t=100568
    Regards
    $-Nitesh-$

  4. #4
    Registered User
    Join Date
    Jan 2006
    Posts
    279

    Re: Smaller icons in my listbox?

    Jack, I double checked - my icons are scaled successfully - I mean icon->Bitmap()->Size return (10, 10)
    Nitesh, what I want is to set the size - I don't want the listbox to scales them. The default scaling the listbox uses does not look visually good ( one is somehow small, the other one is bigger, ... /I am creating an application manager, that shows the icons of other apps/) - I want all the icons to have the same width.
    Last edited by microsoft2; 2009-06-01 at 07:26.

  5. #5
    Super Contributor
    Join Date
    Jul 2007
    Location
    Beijing, China
    Posts
    538

    Re: Smaller icons in my listbox?

    Well, it's weird, maybe you could try another method to do resize
    Code:
    CFbsBitmap* bitmap = new(ELeave) CFbsBitmap(); //new resized bitmap 
    CleanupStack::PushL(bitmap);
    User::LeaveIfError( bitmap->Create(targetSize, aOldBitmap->DisplayMode()) );		
    CFbsBitGc* bitmapGc;
    CFbsBitmapDevice* bitmapDevice = CFbsBitmapDevice::NewL(bitmap);
    User::LeaveIfError( bitmapDevice->CreateContext(bitmapGc) );
    CleanupStack::Pop();//bitmap
    
    bitmapGc->DrawBitmap(TRect(TPoint(0, 0), targetSize), 
    					 aOldBitmap);
    after bitmap resizing, using the new bitmap to create icon
    Code:
    CGulIcon* icon = CGulIcon::NewL( bitmap , NULL);

  6. #6
    Registered User
    Join Date
    Jan 2006
    Posts
    279

    Re: Smaller icons in my listbox?

    Ha! I was just experimenting with almost the same code ! :)))
    Thanks, it works - it seems like the listbox does not scale unscalable bitmap.
    If I ignore the perf and the extra code, the problems is solved :))

Similar Threads

  1. icons in listbox
    By sneha27 in forum Symbian
    Replies: 9
    Last Post: 2009-06-01, 14:57
  2. how to display the Listbox
    By arungupta_2jan in forum Symbian
    Replies: 4
    Last Post: 2009-03-03, 21:10
  3. icons not showing in listbox
    By adamlah in forum Symbian
    Replies: 6
    Last Post: 2009-01-29, 09:54
  4. Listbox icons in S60 v3 Scalable UI
    By PawelDefee in forum Symbian
    Replies: 6
    Last Post: 2006-12-31, 18:25
  5. listbox with icons
    By betasuppe in forum Symbian User Interface
    Replies: 7
    Last Post: 2004-11-25, 08:19

Posting Permissions

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