×

Discussion Board

Results 1 to 4 of 4

Thread: Form query

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

    Form query

    Hi all,
    I have created a form which has 2 edwin controls in it to display some text data. But i find that in the view mode the text gets clipped and ... comes. How this can be solved so that the text wraps up and fits automatically in the screen in form view mode. I am giving the code for reference.
    Code:
    RSS file
    
    RESOURCE FORM r_opponentform_form2
    {
    //flags = EEikFormEditModeOnly;
    flags = EEikFormUseDoubleSpacedFormat ;
    
    items =
    	{
    	
    	DLG_LINE
    		{
    		type=EEikCtEdwin;
    		prompt="JobNo";
    		id=EmyformDlgCIdEdwin;
    		control=EDWIN 
    			{
    			flags = EEikEdwinNoHorizScrolling | EEikEdwinResizable; 
    
    			width=20; 
    			maxlength=50;
    			
    			};
    		},
    		
    		
    		
    		DLG_LINE
    		{
    		type=EEikCtEdwin;
    		prompt="Complain";
    		id=EmyformDlgCIdEdwin3;
    		control=EDWIN 
    			{
    			flags = EEikEdwinNoHorizScrolling | EEikEdwinResizable ;
      	         width=20;
    		 lines=1;
    		 maxlength=300;
    			
    			};
    		}
    		
    		
    		
    	
    	};
    }
    
    void COpponentFormForm2::PreLayoutDynInitL()
    	{
    	CAknForm::PreLayoutDynInitL();
    	LoadFormValuesFromDataL();
    	}
    
    void COpponentFormForm2::LoadFormValuesFromDataL()
    	{
    	
    	
    	
    	CEikEdwin* nameEditor = static_cast <CEikEdwin*> (ControlOrNull(EmyformDlgCIdEdwin));
    	if (nameEditor)
    		{
    	
    		TBuf<50> name;
    		name.Zero();
    		name.Append(_L("1001"));
    		nameEditor->SetTextL(&name);
    
    		}
    		
           	
    		nameEditor = static_cast <CEikEdwin*> (ControlOrNull(EmyformDlgCIdEdwin3));
    	if (nameEditor)
    		{
    	
    		TBuf<80> name1;
    		name1.Zero();
    		name1.Append(_L("Outflow of petrol from the pump is not consistent"));
    		nameEditor->SetTextL(&name1);
    		
    		}
    	
    		
    	
    	
    	}
    thanks and regards,
    Krishna

  2. #2
    Super Contributor
    Join Date
    Jul 2006
    Location
    Oulu, Finland.
    Posts
    1,174

    Re: Form query

    I am not sure but can you try EEdwinAlternativeWrapping flag with your control, give a try.

  3. #3
    Registered User
    Join Date
    Jun 2008
    Posts
    7

    Re: Form query

    im desperate trying to add a form to application,
    and search for examples,
    found one on forum ,but problem is that doesnt write,
    what .lib i have to include and what headers,

    CEikEdwin* nEditor = static_cast <CEikEdwin*> (ControlOrNull(EmyformDlgCIdEdwin));

    First i had to add eikcoctl.lib because of CEikEdwin and include header.
    So far good but problem comes with "EmyformDlgCIdEdwin"
    if i type it in google it showed me only examples from forum.nokia

    The error is : Undefiened Identifier.

    Code is copy paste from example ...

    Im working with Carbide c++, with s60

    Regards

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,697

    Re: Form query

    Generally for .lib-s and .h-s you can simply search for the given class in the SDK Help, there you will find "Location: x.h" and "Link against: y.lib" usually on the very top of the given page.
    In case of EmyformDlgCIdEdwin it is a member of an enumeration (that is why it starts with E), and enumerations with GUI context (like some control in your case) are usually declared in .hrh files, check for it in your include directory. Note the expression "myform", it would be quite an unusual name for some SDK-defined construct.
    Otherwise, ControlOrNull and the like are not necessarily your best friends, CEikDialog defines a number of setter/getter methods, for example SetEdwinTextL/GetEdwinText for your case (EmyformDlgCIdEdwin seems to be the id for an Edwin).

Similar Threads

  1. Form troubles
    By matdodgson in forum Symbian User Interface
    Replies: 2
    Last Post: 2008-12-06, 10:49
  2. form dialog query
    By sapramit in forum Symbian
    Replies: 0
    Last Post: 2005-06-02, 07:14
  3. How to make the query dialog invisible in form
    By shafali gupta in forum Symbian User Interface
    Replies: 1
    Last Post: 2005-01-31, 11:18
  4. Query about form layout with the 6600.
    By Phoenix_Dfire in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2005-01-30, 18: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
  •  
×