Discussion Board
How to add a border for CEikEdwin?
2003-09-15, 10:04
#1
Regular Contributor
Dear All:
How to add a border for CEikEdwin?
I have tried function SetBorder(),but it has no effect!
Thanks in advance!
Regards!
Alan Yin
Registered User
Last edited by attila2008; 2003-09-19 at 08:44 .
Registered User
try to draw the border in Draw() method, like
void CtestContainer: raw(const TRect& aRect) const
{
CWindowGc& gc = SystemGc();
gc.SetPenStyle(CGraphicsContext::ENullPen);
gc.SetBrushColor(KRgbWhite);
gc.SetBrushStyle(CGraphicsContext::ESolidBrush );
gc.DrawRect(aRect);
TGulBorder border;
gc.SetPenStyle(CGraphicsContext::ESolidPen);
gc.SetPenColor(KRgbBlack);
// gc.SetBrushColor(KRgbWhite);
// gc.SetBrushStyle(CGraphicsContext::ENullBrush );
border.Draw(gc,TRect(10, 15, 166, 35));
}
the answer maybe too late, just for those who have the same question.
Last edited by attila2008; 2003-09-19 at 08:49 .
ceikedwin borders
2003-10-15, 16:12
#4
Regular Contributor
I'm afraid it doesnt work, just draw its rect around the control when you draw the view
u can try this
2003-10-15, 16:28
#5
Registered User
iCEikEdwin = new (ELeave) CEikEdwin(TGulBorder::ESingleGray);
I used this. And it works fine for me.
weirder and wierder
2003-10-15, 16:33
#6
Regular Contributor
Yes, already tried all that in the constructor and by a call to SetBorder() and behold it didnt work. The control is constructed but no border !!!What SDK are you using I'm on S60 SDK v1.2 here
Wierd eh ?
Registered User
NavaronSoftware:
TGulBorder: raw () needs _enclosing_ rectangle, so this works correctly:
CWindowGc& gc = SystemGc();
TRect rect (iEdwin->Rect());
rect.Grow(1,1);
TGulBorder border(iEdwin->Border());
border.SetType(TGulBorder::ESingleBlack);
border.Draw (gc, rect);
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules