delphi intraweb 警告框

运行后将显示8种不同颜色的警报框,从上到下依次为:

蓝色 (primary)

灰色 (secondary)

绿色 (success)

红色 (danger)

黄色 (warning)

浅蓝 (info)

浅灰 (light)

深灰 (dark)

unit Unit1;

interface

uses
  Classes, SysUtils, IWAppForm, IWApplication, IWColor, IWTypes,
  IWVCLBaseControl, IWBaseControl, IWBaseHTMLControl, IWControl, IWCompLabel,
  Vcl.Controls, Vcl.Forms, IWVCLBaseContainer, IWContainer, IWHTMLContainer,
  IWHTML40Container, IWRegion, IWBS4CustomRegion, IWBS4Region;

type
  TIWForm1 = class(TIWAppForm)
    IWBS4Region1: TIWBS4Region;
    IWLabel1: TIWLabel;
    IWLabel2: TIWLabel;
    IWLabel3: TIWLabel;
    IWLabel4: TIWLabel;
    IWLabel5: TIWLabel;
    IWLabel6: TIWLabel;
    IWLabel7: TIWLabel;
    IWLabel8: TIWLabel; // 警报8
    procedure IWAppFormCreate(Sender: TObject);
  public
  end;

implementation

{$R *.dfm}

procedure TIWForm1.IWAppFormCreate(Sender: TObject);
begin
  // 1. 响应式布局设置
  PageContext.ExtraHeader.Add
    ('');

  // 2.在ServerController里添加全局CSS HTMLHeaders.Add('');

  // 3. 容器设置
  IWBS4Region1.Css := 'container mt-3';

  // 4. 设置所有警报
  IWLabel1.RawText := True;
  IWLabel1.Text :=
    '';

  IWLabel2.RawText := True;
  IWLabel2.Text :=
    '';

  IWLabel3.RawText := True;
  IWLabel3.Text :=
    '';

  IWLabel4.RawText := True;
  IWLabel4.Text :=
    '';

  IWLabel5.RawText := True;
  IWLabel5.Text :=
    '';

  IWLabel6.RawText := True;
  IWLabel6.Text :=
    '';

  IWLabel7.RawText := True;
  IWLabel7.Text :=
    '';

  IWLabel8.RawText := True;
  IWLabel8.Text :=
    '';
end;

initialization

TIWForm1.SetAsMainForm;

end.

你可能感兴趣的:(开发语言)