Changeset 11 for trunk/Forms/UFormFields.pas
- Timestamp:
- Feb 16, 2015, 10:42:24 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormFields.pas
r8 r11 59 59 {$R *.lfm} 60 60 61 resourcestring 62 SNewField = 'New field'; 63 SFieldsNotSet = 'Fields not set'; 64 STableFields = 'Table fields - %s'; 65 61 66 { TFormFields } 62 67 63 68 procedure TFormFields.FormShow(Sender: TObject); 69 var 70 I: Integer; 64 71 begin 72 for I := 0 to ToolBar1.ButtonCount - 1 do 73 ToolBar1.Buttons[I].Hint := ToolBar1.Buttons[I].Caption; 65 74 if not Assigned(Fields) then 66 raise Exception.Create( 'Fields not set');67 Caption := 'Table fields - ' + TableName;75 raise Exception.Create(SFieldsNotSet); 76 Caption := Format(STableFields, [TableName]); 68 77 UpdateInterface; 69 78 ReloadList; … … 76 85 NewField := TField.Create; 77 86 NewField.Table := Fields.Table; 78 NewField.Name := 'New field'; 87 NewField.Name := SNewField; 88 if Fields.Table.Database.Engine.DataTypes.Count > 0 then 89 NewField.DataType := TDataType(Fields.Table.Database.Engine.DataTypes[0]); 79 90 FormField.Load(NewField); 80 91 if FormField.ShowModal = mrOk then begin
Note:
See TracChangeset
for help on using the changeset viewer.