×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Nov 2011
    Posts
    136

    CEikCommandButton to create button (Image not getting displayed)

    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
    Join Date
    Nov 2011
    Posts
    136

    Re: CEikCommandButton to create button (Image not getting displayed)

    Please any one who can solve my Problem...
    Regards,
    Cholker

  3. #3
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,740

    Re: CEikCommandButton to create button (Image not getting displayed)

    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
    Join Date
    Nov 2011
    Posts
    136

    Re: CEikCommandButton to create button (Image not getting displayed)

    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
    Join Date
    Mar 2012
    Posts
    20

    Re: CEikCommandButton to create button (Image not getting displayed)

    Hi,

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

  6. #6
    Registered User
    Join Date
    Nov 2011
    Posts
    136

    Re: CEikCommandButton to create button (Image not getting displayed)

    thanks , my problem is solved... thanks for your help
    Regards,
    Cholker

  7. #7
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    India
    Posts
    1,173

    Re: CEikCommandButton to create button (Image not getting displayed)

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