--- a/uifw/AvKon/src/Aknpopupform.cpp Tue Aug 31 15:28:30 2010 +0300
+++ b/uifw/AvKon/src/Aknpopupform.cpp Wed Sep 01 12:16:19 2010 +0100
@@ -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();