×

Discussion Board

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

    Problem with Edwin Editor

    Hi all,
    I am using an Edwin Editor(Readonly) to display certain text in my container class. My text is getting displayed properly. But when i move the cursor using the arrow keys, the text gives a blinking effect.
    I dont understand why this is coming. I am giving my code. Pls suggest how to remove this blinking effect.
    Code:
    Resource file
    
    RESOURCE EDWIN r_container_edit1
    {
    maxlength = 600;
    
    flags = EEikEdwinNoHorizScrolling | EEikEdwinResizable |
    EEikEdwinReadOnly |  EEikEdwinNoAutoSelection ;
    
    avkon_flags = EAknEditorFlagEnableScrollBars;
    lines = 100;
    }
    
    Container file
    
    void CMultiViewsContainer3::ConstructL( const TRect& CMultiViewsView3 *aview )
    {
        iview=aview;
    
        CreateWindowL();
        
        iEdit1 = new ( ELeave ) CEikEdwin;
        iEdit1->SetContainerWindowL( *this );
    	
    	TResourceReader reader;
    	iEikonEnv->CreateResourceReaderLC( reader, R_CONTAINER_EDIT1 );
    	iEdit1->ConstructFromResourceL( reader );
    	CleanupStack::PopAndDestroy(); // reader internal state
    	iEdit1->SetTextL( &iview->iBuffer );
    	iEdit1->SetFocus( ETrue );
        
    	SetRect( aRect );
            ActivateL();
        
    	iEdit1->SetWordWrapL(ETrue);
    	iEdit1->SetCursorPosL(0,EFalse);
    	
        
        iBgContext = CAknsBasicBackgroundControlContext::NewL( KAknsIIDQsnBgAreaMain,aRect,ETrue);
    
            	    
        
        
        }
    
    void CMultiViewsContainer3::SizeChanged()
    	{
    	
    	TInt height;
    	TInt width;
    	height= Rect().Height();
    	width= Rect().Width();
    	width= width -15;
    	iEdit1->SetExtent( TPoint( 0, 0 ), TSize(width,height) );
    	
    	
    	
    	if(iBgContext)
    		 {
    		   iBgContext->SetRect(Rect());
    		                if ( &Window() )
    		                {
    		                        iBgContext->SetParentPos( PositionRelativeToScreen() );
    		                }
    		 }
    
    	
    	
    	
    
    	
    	
    	}
    
    void CMultiViewsContainer3::Draw( const TRect& aRect ) const
        {
        CWindowGc& gc = SystemGc();
        
        MAknsSkinInstance* skin = AknsUtils::SkinInstance();
        MAknsControlContext* cc = AknsDrawUtils::ControlContext( this );
        AknsDrawUtils::Background( skin, cc, this, gc, aRect );
    
        
        
        
        
        
        
        }
    
    TKeyResponse CMultiViewsContainer3::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType)
    	{
    	 
    	if (iEdit1)
    		return iEdit1->OfferKeyEventL (aKeyEvent, aType);
    	else
    		return EKeyWasNotConsumed;
    		
    	 // return EKeyWasConsumed;
    	}
    
    void CMultiViewsContainer3::HandleResourceChange(TInt aType)
    	{
    		TRect rect;
    	 
    	    if ( aType==KEikDynamicLayoutVariantSwitch )
    	    {    
    	        AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, rect);
    	        SetRect(rect);
    	    }
    	 
    		CCoeControl::HandleResourceChange(aType);
    	}
    thanks and regards,
    Krishna

  2. #2
    Regular Contributor
    Join Date
    Oct 2007
    Posts
    73

    Re: Problem with Edwin Editor

    Hi all,
    I observe that when i give the skin background in my edwin editor i am getting the flashing effect of text in my edwin editor. However when there is no skin background (white background) in the editor, this flashing effect of text disappears. Can someone tell me why this is happening and what is the way to solve this problem.

    thanks and regards,
    Krishna.

Similar Threads

  1. problem related to SMS text editor
    By deepakk in forum Symbian Networking & Messaging (Closed)
    Replies: 4
    Last Post: 2008-02-21, 11:17
  2. problem related to SMS text editor
    By deepakk in forum General Messaging
    Replies: 1
    Last Post: 2008-02-21, 08:06
  3. EDWIN editor to accept empty text
    By Jeepy in forum Symbian
    Replies: 1
    Last Post: 2005-12-28, 19:45
  4. Problem in configuring the IAP table in Symbian CommDb editor
    By natarajuab in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 2004-12-07, 15:47
  5. Problem Editing text in Series 60 editor square
    By CristianMoron in forum Symbian
    Replies: 0
    Last Post: 2004-04-30, 09:25

Posting Permissions

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