borders and CEikEdwin

Login to reply to this topic.
Thu, 2006-08-17 09:22
Joined: 2005-12-04
Forum posts: 33
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

Thu, 2006-08-17 14:45
Joined: 2005-11-16
Forum posts: 62
Re: borders and CEikEdwin
Hi,
    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 Smiley
Thu, 2006-08-17 15:59
Joined: 2005-12-04
Forum posts: 33
Re: borders and CEikEdwin
Quote from: Badshah
Hi,
    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 Smiley
[/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 ..?/
Thu, 2006-08-17 16:34
NewLC AdministratorSymbian AccreditedForum Nokia Champion
Joined: 2003-01-14
Forum posts: 1886
Re: borders and CEikEdwin
Probably. This depends on how you set the extent of your listbox. If you set the listbox extent to the whole size of its parent then you won't see your border.

Eric Bustarret
NewLC Founder & CEO / Professional Symbian OS Consultant

Mon, 2006-08-21 09:59
Joined: 2005-12-04
Forum posts: 33
Re: borders and CEikEdwin
Quote from: eric
Probably. This depends on how you set the extent of your listbox. If you set the listbox extent to the whole size of its parent then you won't see your border.

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

   
Code:
iListBox = new (ELeave) CAknSingleGraphicStyleListBox;
    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
  • Login to reply to this topic.