[S60,9.1] how to set svgts in tabgroups at compile time, mif file

Login to reply to this topic.
Tue, 2006-04-04 09:44
Joined: 2004-05-21
Forum posts: 42
Hi,
does anybody know how to use svgts in tab groups?

The struct only knows about bmps.
STRUCT TAB
    {
    WORD id=0;
    LTEXT txt="";
    LTEXT bmpfile="";
    WORD bmpid=0xffff;
    WORD bmpmask=0xffff;
    }

Is there are way to set my mif-file at compile time?

I already know about the way to convert svgts to bmps and set
them at runtime to the TabGroup - but this couldn't be the recommended
why, or?

Thanks.
--
Tobias
www.OutBank.de

Tobias.Stoeger


Fri, 2006-05-19 12:03
Joined: 2005-11-16
Forum posts: 63
Re: [S60,9.1] how to set svgts in tabgroups at compile time, mif
Hi Tobias,

I think this is the only way to place SVGs on the navipane. Because you need bitmaps and they can afaik be created from svgs only at runtime.
Can you tell me how _you_ put the icons on the navipane at runtime?
I do it with
Code:
CFbsBitmap *bitmap;
CFbsBitmap *mask;
AknIconUtils::CreateIconL(bitmap, mask, iconfile, EMySvgIcon, EMySvgIcon_mask);
iTabGroup->AddTabL(EMyView, bitmap, mask);

But the icons look some kind of transparent. Did you solve this problem?
Thu, 2006-05-25 20:54
Joined: 2004-05-21
Forum posts: 42
Re: [S60,9.1] how to set svgts in tabgroups at compile time, mif
Hello makom,
I do it like you and additionally a resize before replacing the tabs.
Code:
TSize iconSize( 0, 0 );
AknLayoutUtils::LayoutMetricsSize(AknLayoutUtils::ENaviPane, iconSize ); // Get's the client area size

// There's no "recomended" size ... 70% of the NaviPane seem rigth in all res.
iconSize.iWidth = (iconSize.iHeight /10) * 7;
iconSize.iHeight = (iconSize.iHeight /10) * 7 ;

AknIconUtils::SetSize(bitmap1,  iconSize);
AknIconUtils::SetSize(mask1, iconSize);
--
Tobias
www.OutBank.de

Tobias.Stoeger

  • Login to reply to this topic.