Is it Possible To Implement The Custom Control For CEIkColumnListBox in S60

Login to reply to this topic.
Sun, 2007-10-07 10:09
Joined: 2007-08-31
Forum posts: 54

Hi All,

I Implemented The Custom Control For CEikTextListBox.

The Source Code is there in the Attachments

in My Implementation what i am doing is Just Chaning the CEikTextListBox To CEIkColumnLsitBox

Then i am Getting the EIKCTL panic at The CreatItemDrawL() Function,
i Gone Through the Doccument of S60, Then i came to Conclusion that For CEikcolumnListBox. We wan't be overwriting the CreateItemDrawL().

How we Will be Create The Custom Control For CEikColumnListbox,

my Requirement is i want to over Write the DrawActualItem For ListItemDraw Class.

Can any body plz Help Me.
For Achving this

i want to implent it for S60 3rd Edition FP1

Thanks in Advance
Praveen

AttachmentSize
CustomListBox.cpp8.02 KB
CustomListBox.h1.46 KB

Sun, 2007-10-07 11:02
Joined: 2005-11-20
Forum posts: 1058
Try to derive from CColumnListBoxItemDrawer

Just a guess: What happens if, as an additional change, you derive your class CCustomListItemDrawer from CColumnListBoxItemDrawer instead of CListItemDrawer?


René Brunner

Sun, 2007-10-07 11:36
Joined: 2007-08-31
Forum posts: 54
Re: Is it Possible To Implement The Custom Control For CEIkColum

Hi rbrunner

Thanks For Quick Reply

even i tried for that also
but For Using the CColumnListBoxItemDrawer(we nedd the MTextListBoxModel *aTextListBoxModel,const CFont *aFont, CColumnListBoxData *aColumnData) For Constructing the CCloumnListBoxItemDrawer. any Way i am getting the MTextListBoxModel From the CEikColmunListBox. How We Will get the CColumnListBioxData. CFont

For Creating CFont I tried like this

TFontSpec iFontSpec(_L("SwissA"),170);
iCoeEnv->ScreenDevice()->GetNearestFontInTwips(iFont,iFontSpec);
i am getting Error while compling. i know the Reason For This because DoTypeUid() function in CFont is Pure Virtual so we need to Overwirte this also. (if u know how to overwrite the DoTypeUid() For CFont Let Me Know )

so what i am thinking is using the CColumnLisBoxItemDrawer is More Complex,
is there any solution withou using the CColumnListBoxItemDrawer

Once agin thanks for Giving the Reply

Thanks in Advance

Praveen

Thanks in Adavnce

Praveen

Sun, 2007-10-07 12:15
Joined: 2005-11-20
Forum posts: 1058
Fonts are simple - aren't they?

I am not sure I understand your explanation about CFont::DoTypeUid.

Anyway, constructing a CFont object is rather trivial, your code snippet about that looks basically ok, so if you have a compiler error there, are you sure you don't have a trivial error in your code like a missing .h include?

It would be *very* surprising for me if the CEikColumnListBox works together with anything else than CColumnListBoxItemDrawer. That really can't be, you have to use it, if you ask me, and if there is some technical reason that prevents you from doing so, I guess the whole venture goes down the drain...


René Brunner

  • Login to reply to this topic.