unit XControl;
interface
uses
Windows, Messages, SysUtils, Classes, Controls, StdCtrls, Mask, DB, DBCtrls, VDBConsts,
Forms, Dialogs, Buttons, ComCtrls, Graphics, ExtCtrls, Grids, DBGrids, ADODB, CheckLst,
Menus, Inifiles, ActiveX, ComObj, DBTables, DBClient, SqlExpr, Jpeg, CommCtrl,
Variants, TypInfo, ShellAPI, ZLib;
type
TXLabImage = class(TPanel)
private
FLabel: TLabel;
FImage: TImage;
procedure SetLabel(const Value: TLabel);
procedure SetImagel(const Value: TImage);
public
constructor Create(AOwner:TComponent); override;
destructor Destroy; override;
published
property XLabel: TLabel read FLabel write SetLabel;
property XImage: TImage read FImage write SetImagel;
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('Jfyes Express', [TXLabImage]);
end;
{ TXLabImage }
constructor TXLabImage.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
FImage := TImage.Create(Self);
FImage.Parent := Self;
FImage.Name := 'SubImage';
FImage.SetSubComponent(True);
FLabel := TLabel.Create(Self);
FLabel.Name := 'SubLabel';
FLabel.SetSubComponent(True);
FLabel.Parent := Self;
FLabel.FocusControl := Self;
end;
destructor TXLabImage.Destroy;
begin
FLabel.Free;
FImage.Free;
inherited Destroy;
end;
procedure TXLabImage.SetImagel(const Value: TImage);
begin
FImage := Value;
end;
procedure TXLabImage.SetLabel(const Value: TLabel);
begin
FLabel := Value;
end;