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


L2_pas - часть 8


LUpGroup : ;

NoGroup :

begin

TypesComboBox.Enabled := False;

TypesComboBox.Color := clSilver;

end;

end;

end;

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

begin

if Key = #13 then

Self.FindNextControl(Sender as TWinControl, True, True, True).SetFocus;

end;

procedure TFldDlgFr.TypesComboBoxClick(Sender: TObject);

Var

k : Integer;

wpTFbCommonType : pTFbCommonType;

wpTTableInfo : pTTableInfo;

wpTFieldInfo : pTFieldInfo;

wFieldName,

wFieldDescr : String;

wCaptionUnique : Boolean;

begin { Отслеживание типов данных при выборе из списка }

k := TypesComboBox.ItemIndex;

wpTFbCommonType := pTFbCommonType(TypesComboBox.Items.Objects[k]);

FldNameEdit.Enabled := True;

case wpTFbCommonType.FbTypeGroup of

FldGroup :

begin

FldSizeEdit.Visible := wpTFbCommonType.FbFld.sType = ftString;

Label5.Visible := FldSizeEdit.Visible;

if FldSizeEdit.Visible then

FldSizeEdit.SetFocus;

end;

RefGroup :

begin

FldNameEdit.Enabled := False;

FldNameEdit.Color := clSilver;

wpTTableInfo := wpTFbCommonType.FbRef.spTableInfo;

if CreateRefFieldName(FDbInterface, wpTFbCommonType, wFieldName) then

begin

FldNameEdit.Text := wFieldName;

FldCaptionEdit.Text := wpTTableInfo.sTableAttr.Values['sTableCaption'];

FldDescrEdit.Text := 'Ссылка на таблицу: ' +

wpTTableInfo.sTableAttr.Values['sTableCaption'];

end;

end;

PicGroup :

begin

FldNameEdit.Text := FDbInterface.Get_UniqueFieldName(

FDbInterface.Current_pTTableInfo, nil, wCaptionUnique, wFieldDescr);

FldCaptionEdit.Text := wpTFbCommonType.FbPic.sDescr;

FldDescrEdit.Text := 'Значение из списка: ' +

wpTFbCommonType.FbPic.sDescr;

FldSizeEdit.Text := IntToStr(wpTFbCommonType.FbPic.sSize);

end;

LUpGroup :

begin

FldNameEdit.Enabled := False;

FldNameEdit.Color := clSilver;

wpTTableInfo := wpTFbCommonType.FbLUp.spTableInfo;

wpTFieldInfo := wpTFbCommonType.FbLUp.spFieldInfo;

wFieldName := Get_FbQueryFieldName(wpTTableInfo, wpTFieldInfo);

FldNameEdit.Text := wFieldName;

FldCaptionEdit.Text := Get_FbFullFieldNameS(

wpTTableInfo.sTableAttr.Values['sTableCaption'],

wpTFieldInfo.sFieldAttr.Values['sFieldCaption']);

FldDescrEdit.Text := 'Отлеживание поля: ' +

Get_FbFullFieldNameS(wpTTableInfo.sTableAttr.Values['sTableCaption'],

wpTFieldInfo.sFieldAttr.Values['sFieldCaption']);

end;

NoGroup : ;

end;

end;

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

begin

if not(Key in ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']) then

Key := #0;

end;

end.




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