×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Oct 2007
    Posts
    73

    Font color of CEikEdwin editor

    Hi all,
    I am using a plain text editor. I have enabled for skin support in my APPUI constructL [BaseConstructL( EAknEnableSkin );]. Also i have added code for skin support in my container. I get the background of the main pane as that of the skin in the editor. But my font color comes to be green. But i observe that in the applications available on phone (say message editor), the font color is white. I want to know how i can set the font of my editor exactly like the skin font. I am giving my code for reference.

    Code:
    RESOURCE EDWIN r_my_container_edit1
    	{
    	maxlength = 500;
    	flags = EEikEdwinReadOnly ;
    	default_case = EAknEditorTextCase;
    	allowed_case_modes = EAknEditorAllCaseModes;
    	numeric_keymap = EAknEditorStandardNumberModeKeymap;
    	default_input_mode = EAknEditorTextInputMode;
    	allowed_input_modes = EAknEditorTextInputMode | EAknEditorNumericInputMode | EAknEditorSecretAlphaInputMode | EAknEditorKatakanaInputMode | EAknEditorFullWidthTextInputMode | EAknEditorFullWidthNumericInputMode | EAknEditorFullWidthKatakanaInputMode | EAknEditorHiraganaKanjiInputMode | EAknEditorHalfWidthTextInputMode;
    	special_character_table = 0;
    	avkon_flags = EAknEditorFlagEnableScrollBars;
    	lines = 100;
    	}
    
    void CTestContainer::ConstructL( 
    		const TRect& aRect, 
    		const CCoeControl* aParent, 
    		MEikCommandObserver* aCommandObserver )
    	{
    	if ( aParent == NULL )
    	    {
    		CreateWindowL();
    	    }
    	else
    	    {
    	    SetContainerWindowL( *aParent );
    	    }
    	iFocusControl = NULL;
    	iCommandObserver = aCommandObserver;
    	InitializeControlsL();
    	SetRect( aRect );
    	ActivateL();
    	iEdit1->SetCursorPosL(0,EFalse);
    	
    	iBgContext = CAknsBasicBackgroundControlContext::NewL( KAknsIIDQsnBgAreaMain,aRect,ETrue);
    
    	}
    
    void CTestContainer::InitializeControlsL()
    	{
    	iEdit1 = new ( ELeave ) CEikEdwin;
    	iEdit1->SetContainerWindowL( *this );
    		{
    		TResourceReader reader;
    		iEikonEnv->CreateResourceReaderLC( reader, R_MY_CONTAINER_EDIT1 );
    		iEdit1->ConstructFromResourceL( reader );
    		CleanupStack::PopAndDestroy(); // reader internal state
    		}
    	HBufC* text = StringLoader::LoadLC( R_TEST_CONTAINER_EDIT1_2 );
    		iEdit1->SetTextL( text );
    		CleanupStack::PopAndDestroy( text );		
    
    
       }
    
    void CTestContainer::Draw( const TRect& aRect ) const
    	{
    	CWindowGc& gc = SystemGc();
    	gc.Clear( aRect );
    	
    	
    
    	 // Redraw the background using the default skin
    	 MAknsSkinInstance* skin = AknsUtils::SkinInstance();
    	 MAknsControlContext* cc = AknsDrawUtils::ControlContext( this );
    	 AknsDrawUtils::Background( skin, cc, this, gc, aRect );
    	}
    				
    TTypeUid::Ptr CTestContainer::MopSupplyObject(TTypeUid aId)
    	{
    	 if (iBgContext )
    	 {
    	   return MAknsControlContext::SupplyMopObject( aId, iBgContext );
    	 }
    	 return CCoeControl::MopSupplyObject(aId);
    	}

  2. #2
    Super Contributor
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034

    Re: Font color of CEikEdwin editor


Similar Threads

  1. Is it possible to implement a secret editor using CEikEdwin
    By JackSu in forum Symbian User Interface
    Replies: 2
    Last Post: 2008-01-10, 00:29
  2. Replies: 3
    Last Post: 2007-02-09, 09:08
  3. [announce] full screen dot amtrix scroller
    By xchip in forum Symbian
    Replies: 7
    Last Post: 2006-06-08, 22:17
  4. Customize font of the CEikEdwin dialog line in CAknDialog\CAknForm
    By VigenIssahhanjan in forum Symbian User Interface
    Replies: 0
    Last Post: 2006-01-31, 18:17
  5. How do I change font in an inputfield (for instance CEikEdwin)
    By dissimulo in forum Symbian User Interface
    Replies: 1
    Last Post: 2003-11-15, 19:30

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×