You can fill a rectangle by using gradient brush pattern. The pattern can be created as described below.
CFbsBitmap* brush=new(ELeave)CFbsBitmap;
TInt startColor=KRgbBlue; // This is an application-specific constant
TInt endColor=KRgbWhite; // This is an application-specific constant
TInt brushWidth=10; // This is an application-specific constant
ColorUtils::TBitmapOrientation brushOrientation=ColorUtils::EBitmapOrientationVertical;
ColorUtils::CreateGradientBitmapL(*brush, brushWidth, iEikonEnv->WsSession(), brushOrientation, startColor, endColor);