diff -r 71dd06cfe933 -r 0aa5fbdfbc30 uifw/AvKon/src/Aknpopupform.cpp --- a/uifw/AvKon/src/Aknpopupform.cpp Wed Apr 14 16:14:00 2010 +0300 +++ b/uifw/AvKon/src/Aknpopupform.cpp Tue Apr 27 16:55:05 2010 +0300 @@ -596,6 +596,17 @@ { ClearArea( Rect() ); UpdateScrollIndicatorL(); + // if iNoOfEditorLines becomes small, firstly calculate the New PopupForm layout. + // Because position of PopupForm is related to last PoppupForm layout. + if ( iNoOfEditorLines < oldNoOfLines ) + { + TSize size; + if ( !AknLayoutUtils::LayoutMetricsSize( AknLayoutUtils::EScreen, size ) ) + { + size = iCoeEnv->ScreenDevice()->SizeInPixels() ; + } + SetSizeAndPosition( PreferredSize( size ) ); + } LayoutAndDraw(); } else if ( IsActivated() ) @@ -2336,6 +2347,15 @@ UpdateFlags( ctrlType, ETrue ); CalculateNumberOfScreens(); + // because of insert a control, iNoOfEditorLines of editor become small, + // but position is calculated by previous size of editor, + // So firstly calculate editor layout. + TSize size; + if ( !AknLayoutUtils::LayoutMetricsSize( AknLayoutUtils::EScreen, size ) ) + { + size = iCoeEnv->ScreenDevice()->SizeInPixels() ; + } + SetSizeAndPosition( PreferredSize( size ) ); LayoutAndDraw(); UpdateScrollIndicatorL();