Join Now
Quality Rating:
  • Currently 5.0 / 5
(5.0 / 5 - 1 vote cast)
Expertise Level:
  • Currently 3.0 / 5
(3.0 / 5 - 1 vote cast)

This page was last modified 10:39, 25 March 2008.

CS000862 - Drawing a standard border around a CEikEdwin

From Forum Nokia Wiki


ID CS000862 Creation date March 25, 2008
Platform S60 3rd Edition, MR
S60 3rd Edition, FP1
S60 3rd Edition, FP2 Beta
Tested on devices Nokia E61i
Nokia E90 Communicator
Nokia N95 8GB
Nokia 6220 Classic
Category Symbian C++ Subcategory UI
APIs None Classes TGulBorder
CEikEdwin
Methods TGulBorder::Draw()
TGulBorder::OuterRect()
CEikEdwin::SetBorder()
CEikEdwin::Border()
   

Overview

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
    iEditor->SetBorder(TGulBorder::ESingleDotted);
    
    // ...
    }
void CAppView::Draw(const TRect& aRect) const
    {
    // Get the standard graphics context
    CWindowGc& gc = SystemGc();
 
    // Clear the screen
    gc.Clear(aRect);
 
    // 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));
    }

Postconditions

A standard border is drawn around a CEikEdwin.

Related Discussions
Thread Thread Starter Forum Replies Last Post
Navigation Pane of CEikEdwin grapentin Symbian User Interface 0 2007-03-22 09:54
CEikEdwin Problem Ila Sambharia General Symbian C++ 3 2007-11-28 06:48
CEikRichTextEditor asangamneheri General Symbian C++ 1 2002-08-03 05:50
多行查询如何初始化控件数据? uufile Symbian 12 2006-03-14 16:07
How to disable skin for CEikEdwin? Lichtens Symbian User Interface 2 2008-02-15 08:35
 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX