anchor.diff:    FContent.BSRegionType := bsrtModalContent;
     FContent.Parent := Self;
   
  -  FHeaderText := AHeaderText;
  -  FBodyText := ABodyText;
  -  FCloseButton := True;
  -end;
  -
  -constructor TIWBSDialog.Create(const AHeaderText, ABodyText: string);
  -begin
  -  Create(TIWForm(GGetWebApplicationThreadVar.ActiveForm), AHeaderText, ABodyText);
  -end;
  -
  -function TIWBSDialog.GetTitle: TIWBSRegion;
  -begin
  -  if FTitle = nil then begin
  -    FTitle := TIWBSRegion.Create(Owner);
  -    FTitle.Parent := FContent;
  -    FTitle.BSRegionType := bsrtModalTitle;
  -    FTitle.Top := 0;
  -  end;
  -  Result := FTitle;
  +  if ACloseButton in [iwbsdcCaption, iwbsdcBoth] then
  +    with TIWBSButton.Create(Owner) do begin
  +      Parent := GetHeader;
  +      Top := 0;
  +      Left := 0;
  +      Caption := '';
  +      BSButtonStyle := bsbsClose;
  +      DataDismiss := bsbdModal;
  +    end;
  +
  +  SetBodyText(ABodyText);
  +  SetTitleText(ATitleText);
  +
  +  if ACloseButton in [iwbsdcFooter, iwbsdcBoth] then
  +    with TIWBSButton.Create(Owner) do begin
  +      Parent := GetFooter;
  +      Caption := sIWBSDialogCloseCaption;
  +      DataDismiss := bsbdModal;
  +      Top := 0;
  +      Left := MaxInt;
  +    end;
  +end;
  +
  +constructor TIWBSDialog.Create(const ATitleText, ABodyText: string; ACloseButton: TIWBSDialogCloseButton = iwbsdcBoth);
  +begin
  +  Create(TIWForm(GGetWebApplicationThreadVar.ActiveForm), ATitleText, ABodyText, ACloseButton);
  +end;
  +
  +function TIWBSDialog.GetBodyControl: TIWBSText;
  +begin
  +  if FBodyControl = nil then begin
  +    FBodyControl := TIWBSText.Create(Owner);
  +    FBodyControl.Parent := GetBody;
  +    FBodyControl.Top := 0;
  +    FBodyControl.Left := 0;
  +  end;
  +  Result := FBodyControl;
  +end;
  +
  +function TIWBSDialog.GetBodyText: string;
  +begin
  +  if FBodyControl <> nil then
  +    Result := FBodyControl.Lines.Text
  +  else
  +    Result := '';
  +end;
  +
  +function TIWBSDialog.GetTitleControl: TIWBSLabel;
  +begin
  +  if FTitleControl = nil then begin
  +    FTitleControl := TIWBSLabel.Create(Owner);
  +    FTitleControl.Parent := GetHeader;
  +    FTitleControl.Top := 0;
  +    FTitleControl.Left := 20;
  +  end;
  +  Result := FTitleControl;
  +end;
  +
  +function TIWBSDialog.GetTitleText: string;
  +begin
  +  if FTitleControl <> nil then
  +    Result := FTitleControl.Caption
  +  else
  +    Result := '';
   end;
   
   function TIWBSDialog.GetHeader: TIWBSRegion;
  
positive.code:   Free;
  end;
  
  function TIWBSAlert.AddButton(const ACaption: string; AAsyncClickProc: TIWBSAsyncClickProc): TIWBSButton;
  begin
    Result := TIWBSButton.Create(Owner);
    Result.Parent := Self;
    Result.Caption := ACaption;
    Result.DataDismiss := bsbdAlert;
    Result.AsyncClickProc := AAsyncClickProc;
  end;
  {$endregion}
  
negative.code: uses IWBSRegionCommon, IWApplication, IWBSUtils, IWBSCommon;
  
  {$region 'TIWBSDialog'}
  constructor TIWBSDialog.Create(AForm: TIWForm; const ATitleText, ABodyText: string; ACloseButton: TIWBSDialogCloseButton = iwbsdcBoth);
  begin
    inherited Create(AForm);
    Parent := AForm;
  