×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Regular Contributor
    Join Date
    Feb 2009
    Posts
    108

    Icons of listbox doesn't appear ?

    I tried to create icons from .mif file. The code works fine on S60 3rd MR, I can see the icons on the emulator.
    But on S60 3rd FP1 & FP2, the icons do not appear.
    What would be the problem?

    I have tried the solution mentioned in "KIS000531 - Compatibility problem with binary-encoded SVG images", maybe it's not that problem.

    Here is my code:
    Code:
    	CGulIcon* listIcon;
    	for (TInt i = 0; i < KItemCount; i++)
    		{
    	TInt iconId = 2 * i + EMbmIconMsgbox, maskId = 2 * i + 1 + EMbmIconMsgbox;
    	AknIconUtils::CreateIconLC(icon,
    								mask,
    								iconFile,
    								iconId,
    								maskId);
    	listIcon = CGulIcon::NewL(icon, mask);
    	CleanupStack::Pop(2);
    	CleanupStack::PushL(listIcon);
    	iconArray->AppendL(listIcon);
    	CleanupStack::Pop();
    		}
    	
        iListBox->ItemDrawer()->ColumnData()->SetIconArray( iconArray );
    	CleanupStack::Pop();
    	iListBox->HandleItemAdditionL();
    Code:
    RESOURCE :	
    	mifconv $(ICONTARGETFILENAME) /h$(HEADERFILENAME) \
            /c32 $(ICONDIR)\msgbox.svg\
            /c32 $(ICONDIR)\config.svg\
            /c32 $(ICONDIR)\load.svg\
            /c32 $(ICONDIR)\record.svg
    Last edited by nadis; 2009-09-13 at 05:16.

  2. #2
    Super Contributor
    Join Date
    Nov 2004
    Posts
    1,009

    Re: Icons of listbox doesn't appear ?

    As you haven't done a setSize() of icons this could be a problem.
    Try this, hope it wil resolve the problem.
    Regards,
    Shafali

  3. #3
    Regular Contributor
    Join Date
    Feb 2009
    Posts
    108

    Re: Icons of listbox doesn't appear ?

    I've tried that. The result is still the same.
    And I think in this case I don't need to set the size, listbox will do that, right ?
    It works fine on S60 3rd MR.

  4. #4
    Super Contributor
    Join Date
    Nov 2004
    Posts
    1,009

    Re: Icons of listbox doesn't appear ?

    Icons doesnt appear on 3rd editon FP1 and FP2 devices or emulator?

    If it is devices you can try putting /x in your .mk file while building mif.
    Regards,
    Shafali

  5. #5
    Regular Contributor
    Join Date
    Feb 2009
    Posts
    108

    Re: Icons of listbox doesn't appear ?

    Both device and emulator. I've read the document about compatability of binary-encoded SVG images.
    The "/X" can still not solve this problem.

  6. #6
    Super Contributor
    Join Date
    Nov 2004
    Posts
    1,009

    Re: Icons of listbox doesn't appear ?

    I have used the following code in my listbox and it is working fine

    CFbsBitmap* aBitmap, aMask;
    AknIconUtils::CreateIconL(aBitmap, aMask, pathToIconFile, aIconIndex, aMaskIndex);
    iconList->AppendL(CGulIcon::NewL(aBitmap, aMask));


    Did you tried your MR .exe in the phone, Is it working?
    Regards,
    Shafali

  7. #7
    Super Contributor
    Join Date
    Nov 2004
    Posts
    1,009

    Re: Icons of listbox doesn't appear ?

    Quote Originally Posted by shafalig82 View Post
    I have used the following code in my listbox and it is working fine

    CFbsBitmap* aBitmap, aMask;
    AknIconUtils::CreateIconL(aBitmap, aMask, pathToIconFile, aIconIndex, aMaskIndex);
    iconList->AppendL(CGulIcon::NewL(aBitmap, aMask));


    Did you tried your MR .exe in the phone, Is it working?

    You can try this example code , if it runs proper on all edition it will help you to know about your coding problem else the problem with different building versions.
    http://wiki.forum.nokia.com/index.php/List_box_example
    Regards,
    Shafali

  8. #8
    Regular Contributor
    Join Date
    Feb 2009
    Posts
    108

    Re: Icons of listbox doesn't appear ?

    My original code works fine on all SDK versions if I use .mbm file instead of .mif file.
    But I copy the .mif file generated by 3rd MR SDK into the right directory, the icons are still so shy.
    I am not sure if there is something wrong in my code or .mif file.
    Or their connection?

  9. #9
    Regular Contributor
    Join Date
    Feb 2009
    Posts
    108

    Re: Icons of listbox doesn't appear ?

    My code has been verified ok.
    I use svg icons from avkon2.mif, and it works perfect.
    Thankyou.

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
  •  
×