Статьи Королевства Дельфи


L2_pas


unit F_FldDlg;

interface

uses

Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,

StdCtrls, DbItf, Db, DbTables, Clipper, TypInfo, MnT, Buttons, DbItfT,

Globs;

Type

TFldDlgFr = class (TForm)

FldNameLbl: TLabel;

FldCaptionLbl: TLabel;

FldDescrLbl: TLabel;

FldDataTypeLbl: TLabel;

Label5: TLabel;

FldNameEdit: TEdit;

FldCaptionEdit: TEdit;

FldDescrEdit: TEdit;

OkBtn: TButton;

CancelBtn: TButton;

FldSizeEdit: TEdit;

TypeGroupCmBox: TComboBox;

TypesComboBox: TComboBox;

Label1: TLabel;

Procedure FormCreate(Sender: TObject);

Procedure CancelBtnClick(Sender: TObject);

Procedure FormActivate(Sender: TObject);

Procedure OkBtnClick(Sender: TObject);

Procedure FldNameEditKeyUp(Sender: TObject; Var Key: Word;

Shift: TShiftState);

procedure TypeGroupCmBoxChange(Sender: TObject);

procedure TypesComboBoxKeyPress(Sender: TObject; var Key: Char);

procedure TypesComboBoxClick(Sender: TObject);

procedure FldSizeEditKeyPress(Sender: TObject; var Key: Char);

private

FModalRes : Boolean;

FpTFbCommonType : pTFbCommonType;

FTFbTypeGroup : TFbTypeGroup;

FTFieldType : TFieldType;

FDbInterface : TDbInterface;

procedure SetTypeGroupLayout(ffTFbTypeGroup: TFbTypeGroup);

procedure Set_FDbInterface(const Value: TDbInterface);

public

Function Execute : Bool;

published

Property DbInterface : TDbInterface read FDbInterface write Set_FDbInterface;

end;

Var

FldDlgFr: TFldDlgFr;

implementation

uses F_TbDef;

{$R *.DFM}

procedure TFldDlgFr.Set_FDbInterface(const Value: TDbInterface);

Var

wTFbTypeGroup : TFbTypeGroup;

begin

FDbInterface := Value;

// Настройка списка групп данных

TypeGroupCmBox.Items.Clear;

for wTFbTypeGroup := Low(TFbTypeGroup) to High(TFbTypeGroup) do

TypeGroupCmBox.Items.AddObject(apTypeGroupNames[wTFbTypeGroup],

TObject(wTFbTypeGroup));

// Выбираем первую группу в списке групп данных

TypeGroupCmBox.ItemIndex := 0;

wTFbTypeGroup := TFbTypeGroup(TypeGroupCmBox.Items.Objects[0]);

// Заполнить универсальный список списком выбранного комб. типа




Начало  Назад  Вперед