⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 generalpage.pas

📁 《Delphi COM深入编程》原书光盘
💻 PAS
字号:
unit GeneralPage;

interface

uses SysUtils, Windows, Messages, Classes, Graphics, Controls, StdCtrls,
  ExtCtrls, Forms, ComServ, ComObj, StdVcl, AxCtrls;

type
  TppgGeneral = class(TPropertyPage)
    Label1: TLabel;
    ecColumns: TEdit;
    cbSorted: TCheckBox;
    Label2: TLabel;
    ecTabWidth: TEdit;
  private
    { Private declarations }
  protected
    { Protected declarations }
  public
    { Public declarations }
    procedure UpdatePropertyPage; override;
    procedure UpdateObject; override;
  end;

const
  Class_ppgGeneral: TGUID = '{3774F17A-5D73-11D3-B872-0040F67455FE}';

implementation

{$R *.DFM}

procedure TppgGeneral.UpdatePropertyPage;
begin
  { Update your controls from OleObject }
  ecColumns.Text := IntToStr(OleObject.Columns);
  ecTabWidth.Text := IntToStr(OleObject.TabWidth);
  cbSorted.Checked := OleObject.Sorted;
end;

procedure TppgGeneral.UpdateObject;
begin
  { Update OleObject from your controls }
  OleObject.Columns := StrToInt(ecColumns.Text);
  OleObject.TabWidth := StrToInt(ecTabWidth.Text);
  OleObject.Sorted := cbSorted.Checked;
end;

initialization
  TActiveXPropertyPageFactory.Create(
    ComServer,
    TppgGeneral,
    Class_ppgGeneral);
end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -