hi plz anyone tell how to divide a container into two parts, first part with a list box and second with some number of divisions of screen vertically(i mean in second part, there will be seven divisions vertically.)
hi plz anyone tell how to divide a container into two parts, first part with a list box and second with some number of divisions of screen vertically(i mean in second part, there will be seven divisions vertically.)
you have to re-size each control to your requirement. or you can create composite control.
i have tried to resize my list box as:
iListBox->SetExtent(TPoint(0,0),TSize(250,200));
but text of list item does not gets compressed , and the focus of a particular item is also not got compresed in that defined area(TSize(250,200)).
hi how can i draw a line i.e. to make a partition, one side is list box and other side is some text written.
i know list box is control, so anything drawn will have no effect on container, so i have to resize my control i have tried usinf TSize , but couldn't ..so how can do it
It is absolutely not sure that Avkon listboxes are prepared to work in arbitrary sizes.
For example if you check AknLayoutUtils, you will see,indicating that (at least) the horizontal layout of listbox fields can easily happen to be controlled on device level (solely depending on the screen mode, and totally independent from the size you want to set).Originally Posted by SDK Help
hi wizard..
im using the following to resize my list box:
iListBox->SetExtent(TPoint(0,0),TSize(250,250));
but no use, the text of the items in the list gets hide and focus on an itme is also upto to the end of screen and not confined in the area i mentioned.
its lik this in the list:
(xyztyueueue)...scroll bar n then focus bar
i mean focus is also on item n then scroll bar comes in between n den focus is continued..
Cud u attach a snapshot of ur appln...since it cud be more xplanatory...
Ya i m nt saying that resize will work...
I agree with wizard_hu's comments...
I wanted to know what is happening when you initially set the size of the listbox to half the screen while listbox construction instead of resizing..
If that's working we cud make a workaround for this...
@deepchand:
i think we set the size of the listbox in sizechanged function n dat is what im doing.
if i give the following in sizechanged function, den list box is drawn on whole screen
void CMultiViewsContainer1::SizeChanged()
{
iListBox->SetRect(Rect());
}
1. Resizing probably won't work according to wizard_hu's suggestions.
2. But creating a listbox with the desired size shud work..
To be more specific..if u want to get the desired results..instead of resizing the listbox( i.e if resizing to desired size doesn't work) create the listbox again from scartch with the desired size..
For ex::
1. Create a listbox with size( whole screen)..
2. U want to resize it to half -screen...
a) Resize(half_screen) not working...
b) Destroy the existing listbox...create new listbox with size( half_screen)...
Hope u r getting me.. It may help u...But to be honest i have not tried with half screen but have tried this approach for various sizeChanged() implementations...
@deepchand , im doing the following to create listbox n sets its size:
iListBox = new (ELeave) CAknSingleGraphicStyleListBox;
iListBox->SetContainerWindowL(*this);
TResourceReader reader;
CEikonEnv::Static()->CreateResourceReaderLC(reader,R_MARKABLELIST_LISTBOX);
iListBox->ConstructFromResourceL(reader);
//iListBox->ConstructL(this, EAknListBoxLoopScrolling | EAknListBoxMarkableList);
iListBox->CreateScrollBarFrameL(ETrue);
iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, CEikScrollBarFrame::EOn);
iListBox->SetFocus(EFalse);
TRect iMyEditorRect1(TPoint(0,0),TSize(150,1000));
iListBox->SetRect(iMyEditorRect1);
CleanupStack::Pop();
listBoxItems=static_cast<CDesC16Array*>(iListBox->Model()->ItemTextArray());
AddItem2ListL();
hey , following is the image o fthe problem, im facing with the sizing of list
the focus does not gets shift. or resize itself:
scrollbar is shifted, means list is resized, but not fully, as focus bar is not shifted or confined to resized area
Last edited by vineet.jain; 2010-03-31 at 09:53.
I had asked same question in http://discussion.forum.nokia.com/fo...d.php?t=151416 , you will find some answers there.
Basically in ur containers size changed function call SetExtent() for child controls.
-datha