I have SVG icons to be displayed in listbox. They appear with black background in the list box. How can i make them transaprent. Idont have any masks for them.. Please letme know . it is very urgent..
Thanks
I have SVG icons to be displayed in listbox. They appear with black background in the list box. How can i make them transaprent. Idont have any masks for them.. Please letme know . it is very urgent..
Thanks
basically when you make the SVG, you should define the backgrounf as transparent with the tool you are using for making SVGs. Then add them into the mif file in a way that the mask is also put into there (for exmaple with /c32,1 option), then you can load the icon & mask separately to your listboxes icon array.
Basically i need to have mask SVG icons also for all of my icons.
And in mk file i should be specify as /c32,1 $(ICONDIR)\arrowUpMask.svg.
I have this code for adding icons.
CFbsBitmap* arrowUpIcon = AknIconUtils::CreateIconL(KAvkonBitmapFile,EMbmOhstockclientdemoArrowup );
CleanupStack::PushL( arrowUpIcon );
CFbsBitmap* ArrowUpIconMask = NULL;
CGulIcon* ArrowUpListIcon = CGulIcon::NewL(arrowUpIcon, ArrowUpIconMask );
CleanupStack::Pop( arrowUpIcon ); // now owned by ArrowUpListIcon
CleanupStack::PushL( ArrowUpListIcon );
iconArray->AppendL( ArrowUpListIcon );
In the above code i need to call CreateIconL for mask also..
Please confirmm....
Thanks
you would also need to actually load the mask image, by having it NULL means that it is not used at all..
Hi,
I included
RESOURCE :
mifconv $(ICONTARGETFILENAME) /h$(HEADERFILENAME_PRIVATE) \
/c32 $(ICONDIR)\qgn_menu_OHStockClientDemo.svg \
/c32 $(ICONDIR)\Stocks.svg \
/c32 $(ICONDIR)\Bonds.svg \
/c32 $(ICONDIR)\Currency.svg \
/c32 $(ICONDIR)\arrowup.svg \
/c32,1 $(ICONDIR)\arrowdown.svg \
In the code to add icons i changed to
AknIconUtils::CreateIconL(arrowDownIcon,ArrowDownIconMask,KAvkonBitmapFile,EMbmOhstockclientdemoArrowdown,EMbmOhstockclientdemoArrowdown_mask );
I can see EMbmOhstockclientdemoArrowdown_mask created in the mbg file. But i am not getting any icon for the list item now.
and also EMbmOhstockclientdemoArrowdown_mask appears in red colur not in blue. If the icon id is proper then it is shown in blue color right ? . i dont know what is the problem..
Thanks
Dunno really, it should work e just fine, provided that the image has transparent section on it.