×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Mar 2008
    Posts
    18

    Form not displayed when is created in Container ConstructL

    Hi,

    I am constructing application with many views, containers and forms. My plan is to display form in each of view, when the view is constructed, however I stuck in creating and displaying form in ConstructL of Container. The form is displayed when created in View object from the one option of the menu, but isnt when constructed in ConstructL of container of that view. Below is the code of container, anybody could help. I will be thankfull.

    my ConstructL and Draw of container - I have tried before after, SetRect, ActivateL and there is no effect, decasing Draw give also no effect:
    Code:
    void CS60_Container::ConstructL(const TRect& aRect)
    {
    	CreateWindowL();
    	CS60_TestPersonalDataForm * form = CS60_TestPersonalDataForm::NewL();
    	form->ExecuteLD( R_S60_TESTPERSONALDATADIALOG );
    	SetRect(aRect);
    	ActivateL();
    
    }
    
    void CS60_Container::Draw(const TRect& aRect) const
    {
    	CWindowGc& gc = SystemGc();
    	gc.SetPenStyle(CGraphicsContext::ENullPen);
    	gc.SetBrushStyle(CGraphicsContext::ESolidBrush);
    	gc.SetBrushColor(TRgb(255,255,255));
    	gc.DrawRect(aRect);
    	
    }
    --
    Bartosz Jarzębski

  2. #2
    Regular Contributor
    Join Date
    Feb 2006
    Location
    India,Pune
    Posts
    311

    Re: Form not displayed when is created in Container ConstructL

    Quote Originally Posted by redbart View Post
    Hi,

    I am constructing application with many views, containers and forms. My plan is to display form in each of view, when the view is constructed, however I stuck in creating and displaying form in ConstructL of Container. The form is displayed when created in View object from the one option of the menu, but isnt when constructed in ConstructL of container of that view. Below is the code of container, anybody could help. I will be thankfull.

    my ConstructL and Draw of container - I have tried before after, SetRect, ActivateL and there is no effect, decasing Draw give also no effect:
    Is you Container is derived from CAknForm..Check this http://wiki.forum.nokia.com/index.ph..._from_Resource
    It will help you ..

    Regards,
    Parag Purkar

  3. #3
    Registered User
    Join Date
    Mar 2008
    Posts
    18

    Re: Form not displayed when is created in Container ConstructL

    Nope, my container is derived from CContainer: public CCoeControl, my form is derive from CS60_TestPersonalDataForm : public CAknForm. As I understand correctly the container shall draw on view and display other things, but it isnt. I can of course display some text, but in cannot construct the form.

    UPDATE: When I set the dialog flag to ...FlagWait, then the dialog is displayed, but I think thats not the behavior that I want.
    Last edited by redbart; 2008-04-01 at 10:38. Reason: derivation added
    --
    Bartosz Jarzębski

Similar Threads

  1. Cannot create form
    By Norrit_ in forum Symbian User Interface
    Replies: 1
    Last Post: 2006-03-08, 15:21
  2. Replies: 1
    Last Post: 2006-02-26, 14:23
  3. Listbox & Form
    By tukaram in forum Symbian
    Replies: 1
    Last Post: 2005-06-28, 05:24
  4. Adding a listbox to a form 'pages' resource?
    By advocatee in forum Symbian User Interface
    Replies: 0
    Last Post: 2003-07-08, 15:13

Posting Permissions

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