Revision as of 18:17, 8 October 2008 by extkbeditor1 (Talk | contribs)

Drawing a standard border around a CEikEdwin

From Nokia Developer Wiki
Jump to: navigation, search


Article Metadata
Tested with
Devices(s): Nokia E61i
Nokia E90 Communicator
Nokia N95 8GB
Nokia 6220 Classic
Keywords: TGulBorder, CEikEdwin, TGulBorder::Draw(), TGulBorder::OuterRect(), CEikEdwin::SetBorder(), CEikEdwin::Border()
Created: (25 Mar 2008)
Last edited: extkbeditor1 (08 Oct 2008)


In this code snippet a standard border is drawn around a CEikEdwin. The same technique applies to all controls inherited from CEikBorderedControl.

MMP file

The following libraries are required:

LIBRARY egul.lib
LIBRARY eikcoctl.lib

Header file

CEikEdwin* iEditor;

Source file

void CAppView::ConstructL(const TRect& aRect)
// ...
// Set border type
// ...
void CAppView::Draw(const TRect& aRect) const
// Get the standard graphics context
CWindowGc& gc = SystemGc();
// Clear the screen
// Get the border
TGulBorder border = iEditor->Border();
// Draw the border so that it surrounds iEditor
TRect editorRect = iEditor->Rect();
border.Draw(gc, border.OuterRect(editorRect));


A standard border is drawn around a CEikEdwin.

78 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.