shift iToLabel to left

Login to reply to this topic.
Tue, 2008-09-02 11:28
Joined: 2008-08-22
Forum posts: 20

how can i shift iToLabel to (slightly)left side in my editor.


Tue, 2008-09-02 11:45
Joined: 2003-12-05
Forum posts: 683
Re: shift iToLabel to left

I'd say to your extremely vague question that if iToLabel is a CEikLabel, try calling it's SetRect method after calculating a new area for it. Alternatively you could use SetPosition or SetExtent.

Nokia has done it's best to hide that CEikLabel inherits CCoeControl in the SDK documentation, which contains these methods. Why, beats me.

Tue, 2008-09-02 11:53
Joined: 2008-08-22
Forum posts: 20
Re: shift iToLabel to left

no iToLabel is nt CEiklabel.its CEikEdwin* iToLabel=new(ELeave) CEikEdwin; m sending u my code
iToLabel=new(ELeave) CEikEdwin;
//__UHEAP_MARKENDC(1);
Components().AppendLC(iToLabel);
iToLabel->SetContainerWindowL(*this);
CleanupStack::Pop(iToLabel);
TResourceReader reader;
CEikonEnv::Static()->CreateResourceReaderLC(reader,R_WRITEMSG_LABEL);
iToLabel->ConstructFromResourceL(reader);
// Edwin takes the ownership
CleanupStack::PopAndDestroy();

CEikonEnv::Static()->ReadResource(iBufFromMan, R_FROM_MAN);
CEikonEnv::Static()->ReadResource(iBufSendMan, R_SEND_MAN);
iToLabel->SetTextL(&iBufSendMan);

i want to shift this label toward left in my editor.

Tue, 2008-09-02 12:50
Joined: 2003-12-05
Forum posts: 683
Re: shift iToLabel to left

Editor is a label then... OK; and by shifting you mean that you want to move the editor field to the left? Or what (better check out the other meanings too...). Since CEikEdwin is-a CCoeControl too, and you really want to move the control to the left, then the same answer applies.

  • Login to reply to this topic.