multi column list box with headers

Login to reply to this topic.
Wed, 2007-11-14 18:27
Joined: 2007-11-06
Forum posts: 11

Hi,
I am writing application with multiviews. the first view has listbox and on selecting the list box item , a column list box shold get displayed. hence i have 2 views and 2 containers. one view n container for the listbox and another view and container for column list box. From the first container class handleevent method i am calling ActiveView() to switch to the next view.
I am using multicolumn list box with headers. I am having confusion that how to instantiate this columnlistbox ?

Thanks


Wed, 2007-11-14 21:30
Joined: 2005-11-20
Forum posts: 1248
Re: multi column list box with headers

If you refer to my multi-column-listbox sample code here on NewLC you will find code to build the box in the CDreamAppView::ConstructL method (see file "DreamBox.cpp").


René Brunner

Thu, 2007-11-15 03:47
Joined: 2007-11-06
Forum posts: 11
Re: multi column list box with headers

Thanks .my application is a multiview application. My view is derived from CAknview class not from CCoeControl. While
instantiating the columnlistbox object i can not pass the CCoeControl pointer ?
iBox = newCDreamColumnListBox ( this, 0,aFont ) ; // this pointer is not CCoeControl pointer in my case.
Please let me know.

Thanks again

Thu, 2007-11-15 07:09
Joined: 2005-11-20
Forum posts: 1248
Re: multi column list box with headers

Yeah, I see what you mean.

The first argument of the constructor is really only used to set the parent of the control to the view, by using SetContainerWindowL. In UIQ, views are derived from CCoeControl, and that's why that works.

When I tried to find out how to place a control onto a view in S60, I had some kind of blackout and could not see how to do that, because I could not find a variant of SetContainerWindowL that would take a CAknView. I am sure I stupidly overlook something. Can anybody help out?


René Brunner

Thu, 2007-11-15 10:10
Joined: 2007-11-06
Forum posts: 11
Re: multi column list box with headers

Even in S60 views are derived from CCoeControl except for multiviews. I have made CDreamColumnListbox class as another control container and instantiated from my view2 container . the columnlist box is displayed. But i donot know whether this work around is right ...
myContainer2 :: DoActivate()
{
iDreamContainer = new CDreamAppView::NewL(ClientRect()); // CDreamAppView has CDreamColumnListBox object
}

My another problem is that arrow keys on the emulator does not work. I am not able to scroll the items in the list box.

Could you please tell me is there any problem in this.

Thanks a lot

Thu, 2007-11-15 11:25
Joined: 2005-11-20
Forum posts: 1248
Re: multi column list box with headers

I don't understand exactly what you did, but I believe to know from my experiences that non-working scrolling in a listbox means that there is a focus problem, i.e. that the listbox does not get the focus as it should.

Can't say more regarding a detailed solution in your case, however.


René Brunner

Thu, 2007-11-15 13:17
Joined: 2007-11-06
Forum posts: 11
Re: multi column list box with headers

Brunner, Thanks for your valuable suggestion. I have another problem , there is no hscroll bar in my columnlistbox. attached is the sreen.
am notable to figure out the problem in my code.
I have done iBox->SetScrollBarVisibilityL(CEikScrollBarFrame::EAuto,
CEikScrollBarFrame::EAuto); still scroll bar does not exist.
Regards

AttachmentSize
columnlist.JPG10.23 KB
Fri, 2008-06-20 17:14
Joined: 2008-06-19
Forum posts: 1
Re: multi column list box with headers

I have the same problem ,
there is no hscroll bar in my columnlistbox to ,can you tell me how to solve on S60 .
thanking you

  • Login to reply to this topic.