borders and CEikEdwin
| Thu, 2006-08-17 09:22 | |
|
hi there people ...
am completly lost ... i neeed to add a border to my CEikEdwin and i simple don't see it ... her is the code i used to create the CEikEdwin Code: iEdwin1 = new (ELeave) CEikEdwin; iEdwin1->ConstructL(EEikEdwinNoWrap,KDefaultWidth,KDefaultTextLimit,KDefaultNumberOfLines); iEdwin1->SetContainerWindowL(*this); iEdwin1->SetExtent(EDWIN1_POS, iEdwin1->MinimumSize()); iEdwin1->SetFocus(ETrue); i tired to add this Code: iEdwin1->SetBorder( TGulBorder::EthickDeep); but nothing changed .... help please |
|






Forum posts: 62
  Implement this code in your container's Draw function
CWindowGc& gc = SystemGc();
gc.SetPenStyle(CGraphicsContext::ESolidPen);
gc.SetPenColor(KRgbBlack);
TRect rect(iEdwin1->Rect());
rect.Grow(1,1);
TGulBorder border(iEdwin1->Border());
border.SetType(TGulBorder::ESingleBlack);
border.Draw (gc, rect);
hope this will help you
regards
Badshah
Forum posts: 33
  Implement this code in your container's Draw function
CWindowGc& gc = SystemGc();
gc.SetPenStyle(CGraphicsContext::ESolidPen);
gc.SetPenColor(KRgbBlack);
TRect rect(iEdwin1->Rect());
rect.Grow(1,1);
TGulBorder border(iEdwin1->Border());
border.SetType(TGulBorder::ESingleBlack);
border.Draw (gc, rect);
hope this will help you
regards
Badshah
[/quot]
thanx alot for your reply
but it didn't work ..
i have a listbox in the container too so do u thing this is the problem ..?/
Forum posts: 1886
Eric Bustarret
NewLC Founder & CEO / Professional Symbian OS Consultant
Forum posts: 33
BENGO this is the problem ... i set the rect to the listbox ...
but now how can i SetExtent for the listbox ... i have a listbox as CAknColumnList
and i tired to SetExtent for it but it didn't work i had the following build error
"CCoeControl::SetExtent function does not take 1 argument"
here is the code i use to create my listbox and textbox
iListBox->ConstructL(this, EAknListBoxSelectionList);
iListBox->SetContainerWindowL(*this);
iListBoxRows = new (ELeave) CDesCArrayFlat( KGranularityOfArray );
iId = new (ELeave) CDesCArrayFlat( KGranularityOfArray );
iListBox->Model()->SetItemTextArray( iListBoxRows );
iListBox->Model()->SetOwnershipType(ELbmDoesNotOwnItemArray);
iListBox->ActivateL();
iListBox->CreateScrollBarFrameL(ETrue);
iListBox->ScrollBarFrame()
->SetScrollBarVisibilityL(CEikScrollBarFrame::EOn, CEikScrollBarFrame::EAuto);
iListBox->SetCurrentItemIndex(0);
iListBox->SetExtent(Listbox_pos , Listbox_size );
SetupListIconsL();
//textbox for search
iEdwin1 = new (ELeave) CEikEdwin;
iEdwin1->ConstructL(0,KDefaultWidth,KDefaultTextLimit,KDefaultNumberOfLines);
iEdwin1->SetContainerWindowL(*this);
iEdwin1->SetExtent(EDWIN1_POS, iEdwin1->MinimumSize());
iEdwin1->SetBorder(TGulBorder::ESingleBlack);
iEdwin1->SetFocus(ETrue);
help .... please