×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 27
  1. #1
    Regular Contributor
    Join Date
    May 2009
    Posts
    197

    How to add customize icon in my selection grid

    I have some problem related to grid icons. I have seen related thread http://discussion.forum.nokia.com/fo...d.php?t=175124
    but didn't got my answer. In the forum nokia library i have seen how to create grid items without the rss file. Its working properly but the thing is that in the

    // Adds ICONS from AVKON`s bitmap file
    AddGridIconsL();

    how will i implement my own customize icons . The AddGridIconsL function goes like this
    HTML Code:
     CArrayPtr<CGulIcon*> iconArray = new( ELeave ) CAknIconArray( 1 );
        CleanupStack::PushL( iconArray );
           
        CFbsBitmap* addressIcon = NULL;
    ....
    
     AknIconUtils::CreateIconLC( addressIcon,
                                   addressIconMask, 
                                   KAvkonBitmapFile, 
                                   EMbmAvkonQgn_prop_nrtyp_address, 
                                   EMbmAvkonQgn_prop_nrtyp_address_mask );
    ...
    ..
    ....
    Now the EMbmAvkonQgn_prop_nrtyp_address & EMbmAvkonQgn_prop_nrtyp_address_mask are there in the mbg file but how can i add my own icon in this CreateIconLC function

  2. #2
    Regular Contributor
    Join Date
    May 2009
    Posts
    197

    Re: How to add customize icon in my selection grid

    Please a little help from anyone.

  3. #3
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,143

    Re: How to add customize icon in my selection grid

    I think if you are really on hurry, you could do better searching, anyway, bumbing up a thread after 16 minutes is not really a reasonable behavior..

    anyway, check out the docs for CGulIcon, and see how you can construct one from the mask & image bitmap, and just append that to your array then and use the array normally..

  4. #4
    Regular Contributor
    Join Date
    May 2009
    Posts
    197

    Re: How to add customize icon in my selection grid

    Thanks for your reply...but if you don't want to answer please avoid saying such things there might be a hurry and i have been searching also .If you know something share it other then saying cunning things

  5. #5
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,143

    Re: How to add customize icon in my selection grid

    and did you consider checking on how you can make CGulIcon from CFbsBitmap image&mask ? , or did I misunderstood the problem somehow ?

  6. #6
    Registered User
    Join Date
    Jun 2007
    Location
    Mumbai, India
    Posts
    1,998

    Re: How to add customize icon in my selection grid

    Quote Originally Posted by anup007star View Post
    Thanks for your reply...but if you don't want to answer please avoid saying such things there might be a hurry and i have been searching also .If you know something share it other then saying cunning things
    Hi,

    I think the thread you have referred to has code for what yo are looking for. Also additional references and link can be found here.

    Just follow the comments you will understand it. All you have to do is provide your own mbm resource instead of avkon.mbm.

    Also, what I have observed is that FN DiBo is very active and people are always ready to help you. The solution for your problem is already available, if you are still not able to find it or fix it, please clarify and someone will definitely help you out.

  7. #7
    Regular Contributor
    Join Date
    May 2009
    Posts
    197

    Re: How to add customize icon in my selection grid

    Thanks both of you guys...sorry if i said anything wrong but the problem is a bit different in my case. I can't create mbm file as I have to parse the icons from an xml and display it as an icon of grid. SO in runtime i don't know what arethe icons present. Let me show you the xml i am talking about.

    HTML Code:
     <GridView numColumns="3">
                <A id="1" href="http://steape3.steape.com/dynamicdatahandler.ashx?action=closestrestaurants" t[B]imgsc[/B]arget="self" addmyposition="True" imgsrc="file://closest.png" text="closest restaurants" textposition="bottom"  />
    
                <A id="13" href="http://www.google.com" target="new" imgsrc="file://google.png" text="go to google" textposition="bottom"   />
                <A id="15" href="exit" target="command" imgsrc="file://exit.png"  text="exit" textposition="bottom"  />
            </GridView>
    Here if you see i have some some imgscr which contains png files which will be my icons for the grid and also there are some text which will act as my grid text name. The grid text name part i have done but I am stuck with that icon part as to how show them in my grid view. Any suggestions or sample code will be a great help to me.

  8. #8
    Registered User
    Join Date
    Jun 2007
    Location
    Mumbai, India
    Posts
    1,998

    Re: How to add customize icon in my selection grid

    Hi,

    In this case you neeed to parse and get the png from xml, then convert it in to bitmap format(use CImageDecoder), and if transparency is there create a mask for the same. Then you can pass it to your icon array.

  9. #9
    Nokia Developer Moderator
    Join Date
    Jan 2008
    Location
    Moscow, Russia
    Posts
    3,347

    Re: How to add customize icon in my selection grid

    But you don't needed to create .mbm file. Just try to check in Wiki examples about how to read PNG images.

  10. #10
    Regular Contributor
    Join Date
    May 2009
    Posts
    197

    Re: How to add customize icon in my selection grid

    Let me try it. If I am stuck then will require your help

  11. #11
    Regular Contributor
    Join Date
    May 2009
    Posts
    197

    Re: How to add customize icon in my selection grid

    Can you give me the links where I can see the image reader fro png files

  12. #12
    Nokia Developer Moderator
    Join Date
    Jan 2008
    Location
    Moscow, Russia
    Posts
    3,347

    Re: How to add customize icon in my selection grid

    For example, this one - How to read images to Symbian bitmap

  13. #13
    Registered User
    Join Date
    Jun 2007
    Location
    Mumbai, India
    Posts
    1,998

    Re: How to add customize icon in my selection grid

    These links might be helpful to you

    link 1

    link 2

  14. #14
    Regular Contributor
    Join Date
    May 2009
    Posts
    197

    Re: How to add customize icon in my selection grid

    I am unable to do that.....the function AknIconUtils::CreateIconLC( takes the parameter KIconName which contains the system generated mif file containing the icon. T hough I can read the png image from the link you have given but I am not able to put it in that function. Can you guide me on this with some sample code or something.

  15. #15
    Regular Contributor
    Join Date
    May 2009
    Posts
    197

    Re: How to add customize icon in my selection grid

    Any help from anyone..I am in real need friends.

Similar Threads

  1. How to put functionality on Selection Grid Icons.
    By somnathbanik in forum Symbian
    Replies: 13
    Last Post: 2009-06-01, 14:11
  2. Context sensitive & Selection icon for MSK in 3.2
    By Maplez in forum Symbian User Interface
    Replies: 1
    Last Post: 2008-04-24, 16:12
  3. How to add grid lines for every cell in CAknGrid?
    By Casper1314 in forum Symbian User Interface
    Replies: 1
    Last Post: 2007-06-21, 09:16
  4. Replies: 0
    Last Post: 2007-03-13, 07:02
  5. how to add items to a ListBox with doulbe line and large icon?
    By liuajie in forum Symbian User Interface
    Replies: 2
    Last Post: 2002-11-22, 04:59

Posting Permissions

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