×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    226

    message gets truncated

    Hi,
    I am using CAknQueryDialog class for a message querry display. But the message gets truncated in E70 but displays proper in N95. Is there any way I can change the font size of CAknQueryDialog message? Is there any other alternative querry message display method supported in S60? Pls help

  2. #2
    Regular Contributor
    Join Date
    Jun 2008
    Location
    Tianjin
    Posts
    156

    Re: message gets truncated

    You can create a custom dialog based on CAknDialog, and create a rich text editor in this dialog.
    anson_zhao

  3. #3
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    226

    Re: message gets truncated

    How can a rich text editor be created inside a custom CAknDialog object. Can u pls provide a some sample code?

  4. #4
    Regular Contributor
    Join Date
    Jun 2008
    Location
    Tianjin
    Posts
    156

    Re: message gets truncated

    In rss file.
    Code:
    RESOURCE DIALOG r_dialog_about
        {
        flags = EEikDialogFlagWait | EEikDialogFlagCbaButtons;
        buttons = R_AVKON_SOFTKEYS_OPTIONS_BACK;
        items =
            {
            
            // About title
            DLG_LINE
                {
                type = EAknCtPopupHeadingPane;
                id = EAboutDialogTitle;
                control = AVKON_HEADING
                    {
                    headinglayout = 0;
                    };
                },
    		DLG_LINE
    			{
    			itemflags = EEikDlgItemCtlMinHeightOrLess;
    			type = EEikCtRichTextEditor;
    			id = EAboutDialogText;
    			control=RTXTED
    			{
    				flags = EEikEdwinResizable | 
    							EEikEdwinNoAutoSelection | 
    							EEikEdwinReadOnly | 
    							EEikEdwinAvkonDisableCursor |
    							EEikEdwinWidthInPixels;    
    				};
    			}			
    		};
    	}
    In cpp file.
    Code:
    void CAboutDialog::PreLayoutDynInitL()
        {
        CAknDialog::PreLayoutDynInitL();
        // About title
        iHeading = (CAknPopupHeadingPane*)Control(EAboutDialogTitle);
        HBufC* title = iEikonEnv->AllocReadResourceLC( R_STR_ABOUT );
        iHeading->SetTextL(*title);
        CleanupStack::PopAndDestroy(title);
    
    
        // message	
    	iEdit = (CEikRichTextEditor*) Control( EAboutDialogText );
        iEdit->SetAlignment( EAknEditorAlignCenter );
    
    
    	TMargins8 margins;
    	margins.iLeft   = KEditMarginCommon;
    	margins.iRight  = KEditMarginCommon;
    	margins.iTop    = KEditMarginCommon;
    	margins.iBottom = KEditMarginBottom;
        iEdit->SetBorderViewMargins(margins);		
    
    
        iEdit->CreateScrollBarFrameL();
    	iEdit->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, 
    													CEikScrollBarFrame::EAuto);													
        // Set the edwin text
        iTextContent = iEikonEnv->AllocReadResourceLC( R_STR_ABOUT_TEXT );
        iEdit->SetTextL(iTextContent);
    	
    	iEdit->Text()->InsertL(iEdit->Text()->DocumentLength(),CEditableText::ELineBreak);  
    	iEdit->Text()->InsertL(iEdit->Text()->DocumentLength(),CEditableText::ELineBreak);  
    
        // skin color
        TTAUtility::SetRichTextColorL(iEdit, *iTextContent);
    	CleanupStack::PopAndDestroy(iTextContent);	
    
    	LayoutControls();				
        }
    anson_zhao

Similar Threads

  1. Problem with Cabride.c++ v1.1
    By markovuksanovic in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 3
    Last Post: 2007-01-24, 20:05
  2. Replies: 1
    Last Post: 2006-12-18, 20:04
  3. Replies: 5
    Last Post: 2006-08-28, 14:35
  4. Help on sending Message :(
    By vasant21 in forum Symbian
    Replies: 1
    Last Post: 2006-07-07, 06:38
  5. Nokia Image Converter
    By davidpurdie in forum General Development Questions
    Replies: 0
    Last Post: 2004-02-18, 15:31

Posting Permissions

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