- Ваш компьютеp не загpужается. Мы тpебуем, чтоб сменили пpоцессоp! А в синей таблице (имеется в виду NC) были какие-то с pешётками (имеются в виду защищённые системные файлы). Наш сын хоpошо в этом pазбиpается, они в техникуме все компьютеpы пpоходят. Он сказал, что это сбои на винчестеpе, но ему удалось от них избавиться...
unit Editlbl1;
interfaceuses
SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
Forms, Dialogs, stdctrls;
type
TLabelEdit = class(TWinControl)
private{ Private declarations }
FEdit: TEdit;
FLabel: TLabel;
function GetLabelCaption: string;
procedure SetLabelCaption(LabelCaption: string);
function GetEditText: string;
procedure SetEditText(EditText: string);
protected{ Protected declarations }public{ Public declarations }constructor Create(AOwner: TComponent); override;
publishedproperty LabelCaption: string read GetLabelCaption write SetLabelCaption;
property EditText: string read GetEditText write SetEditText;
property Left;
property Top;
property Width;
property Height;
property Text;
property Font;
{ Можете опубликовать другие, необходимые вам свойства. }{ Published declarations }end;
procedureRegister;
implementationconstructor TLabelEdit.Create(AOwner: TComponent);
begininherited Create(AOwner);
FEdit := TEdit.Create(self);
FLabel := TLabel.Create(self);
with FLabel dobegin
Width := FEdit.Width;
visible := true;
Parent := self;
Caption := 'LabelEdit';
end;
with FEdit dobegin
Top := FLabel.Height + 2;
Parent := self;
Visible := true;
end;
Top := 0;
Left := 0;
Width := FEdit.Width;
Height := FEdit.Height + FLabel.Height;
Visible := true;
end;
function TLabelEdit.GetLabelCaption: string;
begin
Result := FLabel.Caption;
end;
procedure TLabelEdit.SetLabelCaption(LabelCaption: string);
begin
FLabel.Caption := LabelCaption;
end;
function TLabelEdit.GetEditText: string;
begin
Result := FEdit.Text;
end;
procedure TLabelEdit.SetEditText(EditText: string);
begin
FEdit.Text := EditText;
end;
procedureRegister;
begin
RegisterComponents('Test', [TLabelEdit]);
end;
end.
Статья Комбинация TLabel и TEdit раздела Компоненты и Классы TLabel может быть полезна для разработчиков на Delphi и FreePascal.
Комментарии и вопросы
Материалы статей собраны из открытых источников, владелец сайта не претендует на авторство. Там где авторство установить не удалось, материал подаётся без имени автора. В случае если Вы считаете, что Ваши права нарушены, пожалуйста, свяжитесь с владельцем сайта.