LISTBOX

Login to reply to this topic.
Thu, 2005-08-04 11:51
Joined: 2005-08-04
Forum posts: 27
hello all
i am a new user in symbian series 60. i want to add listbox in my application. i add this code in in mycotainer.cpp, in mycotainer.h and .rss the following code  

mycotainer.cpp:
TInt resourceId = R_MY_LISTBOX;
TResourceReader reader;
iEikonEnv->CreateResourceReaderLC(reader, resourceId);
iListBox->ConstructFromResourceL(reader);
CleanupStack::PopAndDestroy(); // resource pushed in CreateResourceReaderLC

// create listbox scrollbar...
// set icons...

SizeChanged();
iListBox->ActivateL();
DrawNow();  

mycotainer.h:
CEikColumnListBox* iListBox;

.rss:
RESOURCE LISTBOX r_list_listbox {
   array_id = r_list_items;
   flags = EAknListBoxSelectionList;
}

RESOURCE ARRAY r_list_items {
   items =
   {
      LBUF { txt = "\tFirst"; },
      LBUF { txt = "x\tSecond"; },
      LBUF { txt = "\tThird"; }
   };     
}


but it gives   'R_MY_LISTBOX' : undeclared identifier error

i have created a simply application which two menu and two submenu

please anyone give me the directions - how can i solve it



thanks

bashar

Thu, 2005-08-04 13:09
Forum Nokia Champion
Joined: 2004-05-26
Forum posts: 732
Re: LISTBOX
Check this link: http://forum.newlc.com/index.php/topic,9048.msg26805.html
Search in this forum with listbox, you will find so manu topics.

Thu, 2005-08-04 14:03
Joined: 2005-08-04
Forum posts: 27
Re: LISTBOX
thanks for suggestion. i have added this code but still it gives error. i have said i am new in symbian. i cann't understand where is the problem.

it gives

error C2065: 'iCtrlArray' : undeclared identifier
error C2228: left of '.Append' must have class/struct/union type
error C2065: 'KGranularityOfArray' : undeclared identifier

should i add something in mycontainer.h file?
what is      iCtrlArray.Append( iListBox ); 
                KGranularityOfArray    ------ CDesCArray *itemList = new (ELeave) CDesCArrayFlat(KGranularityOfArray);

please check

thanks
bashar
Thu, 2005-08-04 16:53
Joined: 2004-05-27
Forum posts: 20
Re: LISTBOX
bashar,

     you have tried to copy some example and tried to compile it, just see wonderfull example given in examples folder

of Series 60 SDK for Platform 2.0. ilustrating with all type of listboxes. Smiley

regards,
adhilu.
Thu, 2005-08-04 17:36
Forum Nokia Champion
Joined: 2004-05-26
Forum posts: 732
Re: LISTBOX
Please go through this link: http://www.newlc.com/article.php3?id_article=136, for better understanding about the Listbox MVC Paradigm. You will find everything related to listbox from that article.

Fri, 2005-08-05 11:44
Joined: 2005-08-04
Forum posts: 27
Re: LISTBOX
hello all

thanks everyone for your response. i have got the solution.

now can u help me about the listbox's handleevent?? pls give some advice

thanks
bashar
  • Login to reply to this topic.