Multiple Choice Question

Login to reply to this topic.
Fri, 2007-09-14 06:31
Joined: 2006-03-06
Forum posts: 106

Hi

I want to display a multiple choice on screen provided that the length of the question can vary and the no of choices for particular question can vary from 2 to any number.

for ex:

1) what is the capital of India?

a)Delhi
b)Calcutta
c)Mumbai

2) who is the first prime minister of free India?

a)Manmohan singh
b)Pt. Jawahar Lal Nehru
c)Lal bahadur shastri
d)Dr. Rajendra Prasad

Please tell me which Control i can use to display such type of questions.

regards
Himanshu


Fri, 2007-09-14 10:38
Joined: 2006-10-05
Forum posts: 80
Re: Multiple Choice Question

Hi,

I think you you will have to use more than one control.

For the question, can use a label to display your question.Below that you can use a multi-selection List Box for the options.

According to me, each question will occupy one view, so you have to make as many screens as your questions so as to give a good visual appeal to your application. More than one question in one view will not appear so well.

Fri, 2007-09-14 12:54
Joined: 2006-03-06
Forum posts: 106
Re: Multiple Choice Question

hi

thanks for reply.

One think i want to make it clear that i have to display only one question at a time.
the other thing is that suppose if my question width is greater than that of Screen width than CEikLabel will not help me. In this case i am not able to display complete question.

regards
Himanshu

Fri, 2007-09-14 13:46
Joined: 2006-10-05
Forum posts: 80
Re: Multiple Choice Question

Hi,

I think you can increase the size of the label to fit your question in it. You can keep its width same as that of your mobile screen's width. And keep the height such that it fits 2 or 3 lines as per ur requirement.

Check out more APIs of CEikLabel . I am sure you will find the above functionality in it.
Do refer:
http://www.symbian.com/developer/techlib/v70docs/SDL_v7.0/doc_source/reference/cpp/UikonCoreControls/class_CEikLabel.html

I am not sure how this works, but you can also check out this link:
http://wiki.forum.nokia.com/index.php/Multiline_CEikLabel

Mon, 2007-09-17 10:02
Joined: 2006-03-06
Forum posts: 106
Re: Multiple Choice Question

hi

thanks for reply.

Link provided by you is useful but now i am facing another problem suppose if i set the listbox extent as written below

iListBox->SetExtent( TPoint(0,100), iListBox->MinimumSize());

then i am not able to view the listbox contents.

regards
Himanshu

Mon, 2007-09-17 10:37
Joined: 2006-10-05
Forum posts: 80
Re: Multiple Choice Question


Why have you written this way:
iListBox->SetExtent( TPoint(0,100), iListBox->MinimumSize());

On what basis are you taking "100" y-co-ordinate? Are you leaving that much space for the label above it?

Does your list box have any items/elements when above code gets executed? I think if there are no ListBox items present, then the MinimumSize() will be 0.

Tue, 2007-09-18 11:24
Joined: 2006-03-06
Forum posts: 106
Re: Multiple Choice Question

hi

problem resolved.

I set the size of listbox in
iListBox->SetExtent() function as

iListBox->SetExtent( TPoint(0,iTextHeight), TSize(ClientRect().Size().iWidth,ClientRect().Size().iHeight-iTextHeight));

now i am able to view the elements of Listbox but what if my label takes the whole screen to display the text?

regards
Himanshu

Tue, 2007-09-18 13:42
Joined: 2006-10-05
Forum posts: 80
Re: Multiple Choice Question

You can also use a text editor to display your question since editors can be scrolled. Try out, me not sure!!

  • Login to reply to this topic.