Adding two textbox ....getting problem

Login to reply to this topic.
Fri, 2008-01-25 12:38
Joined: 2008-01-23
Forum posts: 5

hi friends i want add two textbox in one application...
but when i add second textbox the program not luanced in series 60....
plz help me....
anyone
i write code here ...

void CtextboxContainer::ConstructL(const TRect& aRect)
{
CreateWindowL();

iLabel = new (ELeave) CEikLabel;
iLabel->SetContainerWindowL( *this );
iLabel->SetTextL( _L("Enter Name ") );

iToDoLabel = new (ELeave) CEikLabel;
iToDoLabel->SetContainerWindowL( *this );
iToDoLabel->SetTextL( _L("Address") );


iTxt = new (ELeave) CEikEdwin;
iTxt->SetContainerWindowL( *this );

TResourceReader reader;
iCoeEnv->CreateResourceReaderLC( reader, R_TEXTBOX );
iTxt->ConstructFromResourceL( reader );
CleanupStack::PopAndDestroy(); // Resource reader

iTxt->SetReadOnly(EFalse);
iTxt->SetFocus(ETrue);

iTxt1 = new (ELeave) CEikEdwin;
iTxt1->SetContainerWindowL( *this );

TResourceReader reader1;
iCoeEnv->CreateResourceReaderLC( reader, R_TEXTBOX1 );
iTxt1->ConstructFromResourceL( reader1 );
CleanupStack::PopAndDestroy(); // Resource reader

iTxt1->SetReadOnly(EFalse);
iTxt1->SetFocus(ETrue);

SetRect(aRect);
ActivateL();
}

  • Login to reply to this topic.