Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User cholker's Avatar
    Join Date
    Nov 2011
    Posts
    135
    Hi, i am using following code to create image button , i am using SVG Image , this is displaying button but Plain... no Image getting displayed....


    iButton = new (ELeave) CEikCommandButton();
    AknIconUtils::CreateIconL(iMyIcon, iMyIconMask, KMyIconMif,
    EMbmTemppro_aifLogo, EMbmTemppro_aifLogo_mask);
    AknIconUtils::PreserveIconData(iMyIcon);
    AknIconUtils::PreserveIconData(iMyIconMask);
    TSize xx;
    xx.iHeight = iButton->Size().iHeight / 2;
    xx.iWidth = iButton->Size().iWidth / 2;

    err = AknIconUtils::SetSize(iMyIcon, xx, EAspectRatioPreserved);
    AknIconUtils::SetSize(iMyIconMask, xx, EAspectRatioPreserved);

    //iButton->SetPictureL(iMyIcon,iMyIcon,CEikCommandButtonBase::EFirst);

    iButton->SetPictureL(iMyIcon, iMyIconMask);
    iButton->SetDisplayContent(CEikCommandButton::EPictureOnly);
    iButton->SetContainerWindowL(*this);


    Please help me to solve this Problem...

    i have tried to display BMP Image it is getting displayed but getting problem in setting size , so tried to use SVG

    Thanks in advance
    Regards,
    Cholker

  2. #2
    Registered User cholker's Avatar
    Join Date
    Nov 2011
    Posts
    135
    Please any one who can solve my Problem...
    Regards,
    Cholker

  3. #3
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    Can the device/emulator display the given SVG file? You can try putting it into an accessible location (like the memory card of the device or epoc32\winscw\c\data of the emulator), and open it with the File Manager.
    Also, there may be scaling problems, check the viewBox attribute: http://www.developer.nokia.com/Commu..._(Known_Issue)

  4. #4
    Registered User cholker's Avatar
    Join Date
    Nov 2011
    Posts
    135
    No Problem as such... i tried displaying image using BitBil and that was drawn Properly, i tried with same size also .. but no problem with Image...
    Regards,
    Cholker

  5. #5
    Registered User kalyani2u's Avatar
    Join Date
    Mar 2012
    Posts
    20
    Hi,

    You can try adding SetPictureOwnedExternally() after SetPictureL() and then call DrawNow() after setting up the image.

  6. #6
    Registered User cholker's Avatar
    Join Date
    Nov 2011
    Posts
    135
    thanks , my problem is solved... thanks for your help
    Regards,
    Cholker

  7. #7
    Nokia Developer Champion pooja_1650's Avatar
    Join Date
    Nov 2011
    Location
    India
    Posts
    309
    Quote Originally Posted by cholker View Post
    thanks , my problem is solved... thanks for your help
    It will be better if you mention here the cause of your solution for future references.

Similar Threads

  1. pressed image is not displayed on the button
    By cortopastito in forum Symbian User Interface
    Replies: 2
    Last Post: 2012-01-04, 14:48
  2. to create a event in CEikCommandButton instance
    By suryadas in forum Symbian C++
    Replies: 3
    Last Post: 2009-07-25, 13:09
  3. problem in display an image button on canvas(Background image)
    By mramin05 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 3
    Last Post: 2008-11-12, 04:51
  4. Replies: 3
    Last Post: 2008-03-03, 11:44

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved