×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Nov 2011
    Posts
    71

    Jpg images to listbox icons

    Hello all I working with s60 5th edition. I want to add jpg image files from web service to listbox icon. I am not having image mask. I have successfully saved images to the folder. How can i do this, could anybody tell me please.

    Thanks in advance
    Last edited by dev_Cis; 2011-12-13 at 11:12.

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: Jpg images to listbox icons

    Then you would use them without masks, check wiki for Image Decoder examples, Basically you would need to open the image to CFbsBitmap, then make CGulIcon out from it and add the icon to list box icon array as usual.

  3. #3
    Registered User
    Join Date
    Nov 2011
    Posts
    71

    Re: Jpg images to listbox icons

    Thanks for reply Yucca ......

    I have used wiki example for read image but I am getting error in constructing ...............
    "function call does not match."
    ***************************************************

    CImageReader* iJPG_Reader;
    -----------
    ----------
    --------

    iJPG_Reader = new(ELeave)CImageReader(*iListBox);<-------------------------------(here)
    iJPG_Reader->ConstructL(KFile);

    ***************************************************

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: Jpg images to listbox icons

    Do check what kinf of interface is required there, and then give the constructor the correct type of interface. Anyway, the CImageReader sounds like a custom class definition..

  5. #5
    Registered User
    Join Date
    Nov 2011
    Posts
    71

    Re: Jpg images to listbox icons

    Yes it is custom class constructed implementing 'MImageReadyCallBack' .
    I have extended my container class with it and implemented its base class virtual function 'void ImageReadyL(const TInt& aError) = 0;'
    Now it is giving error...............
    "illegal use of abstract class ('CJpgIconListBox::ImageReadyL(const int &)')"

  6. #6
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: Jpg images to listbox icons

    You should check how to implement virtual functions with C++.

    Basically 'void ImageReadyL(const TInt& aError) = 0;' defined a pure virtual function, i.e. the implementation is not available, but should be implemented by the class deriving the class where the pure virtual definition is done.

    thus do define it as 'void ImageReadyL(const TInt& aError);' in your class (header file) and implement the function in your source file for the class.

  7. #7
    Registered User
    Join Date
    Nov 2011
    Posts
    71

    Re: Jpg images to listbox icons

    I am getting error in first phase constructor NewL () ............

    ************************************************
    {
    CJpgIconListBox* self = CJpgIconListBox::NewLC(
    aRect,
    aParent,
    aCommandObserver );
    CleanupStack::Pop( self ); <---------------------------- (Panic E32USER-CBase 90)
    return self;
    }

  8. #8
    Registered User
    Join Date
    Jan 2005
    Location
    Italy
    Posts
    639

    Re: Jpg images to listbox icons

    what's in your NewLC ?
    maybe you simply forgot to write CleanupStack::PushL(self) into it

    regards
    pg

  9. #9
    Registered User
    Join Date
    Nov 2011
    Posts
    71

    Re: Jpg images to listbox icons

    Thanks pavarang for reply .....
    I got the problem, i was pushing icon array in cleanup stack but not popping it....
    but my list box still showing no data....

  10. #10
    Registered User
    Join Date
    Nov 2011
    Posts
    71

    Re: Jpg images to listbox icons

    Thanks to both of you now image is showing in list box icon, i was not calling the add list items array in right manner.

Similar Threads

  1. CAknSingleLargeStyleListBox svg images for icons
    By digitalsol in forum Symbian User Interface
    Replies: 1
    Last Post: 2011-01-20, 18:10
  2. List with Images as Icons
    By symbian_champ in forum Symbian
    Replies: 1
    Last Post: 2007-09-18, 09:32
  3. How to create transparency icons using SVG images
    By mrautane in forum Symbian User Interface
    Replies: 1
    Last Post: 2007-06-08, 21:11
  4. How to load images to a listbox as icons
    By binubabykurian in forum Symbian
    Replies: 1
    Last Post: 2005-01-20, 11:53
  5. Icons and Images
    By mmcbride in forum Mobile Java Media (Graphics & Sounds)
    Replies: 4
    Last Post: 2004-09-08, 09:55

Posting Permissions

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