408 TRect viewerRect( viewerLayoutText.TextRect() ); |
408 TRect viewerRect( viewerLayoutText.TextRect() ); |
409 iType->SetRect( viewerRect ); |
409 iType->SetRect( viewerRect ); |
410 |
410 |
411 // Move focus rect so that it's relative to field's position. |
411 // Move focus rect so that it's relative to field's position. |
412 viewerRect.Move( -Position() ); |
412 viewerRect.Move( -Position() ); |
413 SetFocusRect( viewerRect ); |
413 |
|
414 TAknLayoutRect bgLayoutRect = |
|
415 NMRLayoutManager::GetLayoutRect( |
|
416 rect, NMRLayoutManager::EMRLayoutTextEditorBg ); |
|
417 TRect bgRect( bgLayoutRect.Rect() ); |
|
418 |
|
419 // Adjust background rect according to viewerRect |
|
420 bgRect.SetWidth( viewerRect.Width() ); |
|
421 |
|
422 // Move focus rect so that it's relative to field's position. |
|
423 bgRect.Move( -Position() ); |
|
424 |
|
425 SetFocusRect( bgRect ); |
|
426 |
414 |
427 |
415 TAknTextComponentLayout editorLayout( |
428 TAknTextComponentLayout editorLayout( |
416 NMRLayoutManager::GetTextComponentLayout( |
429 NMRLayoutManager::GetTextComponentLayout( |
417 NMRLayoutManager::EMRTextLayoutTextEditor ) ); |
430 NMRLayoutManager::EMRTextLayoutTextEditor ) ); |
418 AknLayoutUtils::LayoutLabel( iType, rect, editorLayout ); |
431 AknLayoutUtils::LayoutLabel( iType, rect, editorLayout ); |