Browse Source

New generic TBCMaterialEdit class

Melchiorre Caruso 10 months ago
parent
commit
b49607f94e
1 changed files with 284 additions and 206 deletions
  1. 284 206
      bcmaterialedit.pas

+ 284 - 206
bcmaterialedit.pas

@@ -1,6 +1,6 @@
 unit BCMaterialEdit;
 unit BCMaterialEdit;
 
 
-{$I bgracontrols.inc}
+{$mode objfpc}{$H+}
 
 
 interface
 interface
 
 
@@ -10,25 +10,20 @@ uses
 
 
 type
 type
 
 
-  { TBCMaterialEdit }
+  { TBCMaterialEditBase }
 
 
-  TBCMaterialEdit = class(TCustomControl)
+  generic TBCMaterialEditBase<T> = class(TCustomPanel)
   private
   private
     FAccentColor: TColor;
     FAccentColor: TColor;
     FDisabledColor: TColor;
     FDisabledColor: TColor;
-    FEdit: TEdit;
+    FEdit: T;
     FLabel: TBoundLabel;
     FLabel: TBoundLabel;
     FFocused: boolean;
     FFocused: boolean;
     function IsNeededAdjustSize: boolean;
     function IsNeededAdjustSize: boolean;
 
 
     function GetOnEditChange: TNotifyEvent;
     function GetOnEditChange: TNotifyEvent;
     function GetOnEditClick: TNotifyEvent;
     function GetOnEditClick: TNotifyEvent;
-    function GetOnEditContextPopup: TContextPopupEvent;
-    function GetOnEditDblClick: TNotifyEvent;
-    function GetOnEditDragDrop: TDragDropEvent;
-    function GetOnEditDragOver: TDragOverEvent;
     function GetOnEditEditingDone: TNotifyEvent;
     function GetOnEditEditingDone: TNotifyEvent;
-    function GetOnEditEndDrag: TEndDragEvent;
     function GetOnEditEnter: TNotifyEvent;
     function GetOnEditEnter: TNotifyEvent;
     function GetOnEditExit: TNotifyEvent;
     function GetOnEditExit: TNotifyEvent;
     function GetOnEditKeyDown: TKeyEvent;
     function GetOnEditKeyDown: TKeyEvent;
@@ -42,17 +37,11 @@ type
     function GetOnEditMouseWheel: TMouseWheelEvent;
     function GetOnEditMouseWheel: TMouseWheelEvent;
     function GetOnEditMouseWheelDown: TMouseWheelUpDownEvent;
     function GetOnEditMouseWheelDown: TMouseWheelUpDownEvent;
     function GetOnEditMouseWheelUp: TMouseWheelUpDownEvent;
     function GetOnEditMouseWheelUp: TMouseWheelUpDownEvent;
-    function GetOnEditStartDrag: TStartDragEvent;
     function GetOnEditUTF8KeyPress: TUTF8KeyPressEvent;
     function GetOnEditUTF8KeyPress: TUTF8KeyPressEvent;
 
 
     procedure SetOnEditChange(AValue: TNotifyEvent);
     procedure SetOnEditChange(AValue: TNotifyEvent);
     procedure SetOnEditClick(AValue: TNotifyEvent);
     procedure SetOnEditClick(AValue: TNotifyEvent);
-    procedure SetOnEditContextPopup(AValue: TContextPopupEvent);
-    procedure SetOnEditDblClick(AValue: TNotifyEvent);
-    procedure SetOnEditDragDrop(AValue: TDragDropEvent);
-    procedure SetOnEditDragOver(AValue: TDragOverEvent);
     procedure SetOnEditEditingDone(AValue: TNotifyEvent);
     procedure SetOnEditEditingDone(AValue: TNotifyEvent);
-    procedure SetOnEditEndDrag(AValue: TEndDragEvent);
     procedure SetOnEditEnter(AValue: TNotifyEvent);
     procedure SetOnEditEnter(AValue: TNotifyEvent);
     procedure SetOnEditExit(AValue: TNotifyEvent);
     procedure SetOnEditExit(AValue: TNotifyEvent);
     procedure SetOnEditKeyDown(AValue: TKeyEvent);
     procedure SetOnEditKeyDown(AValue: TKeyEvent);
@@ -66,7 +55,6 @@ type
     procedure SetOnEditMouseWheel(AValue: TMouseWheelEvent);
     procedure SetOnEditMouseWheel(AValue: TMouseWheelEvent);
     procedure SetOnEditMouseWheelDown(AValue: TMouseWheelUpDownEvent);
     procedure SetOnEditMouseWheelDown(AValue: TMouseWheelUpDownEvent);
     procedure SetOnEditMouseWheelUp(AValue: TMouseWheelUpDownEvent);
     procedure SetOnEditMouseWheelUp(AValue: TMouseWheelUpDownEvent);
-    procedure SetOnEditStartDrag(AValue: TStartDragEvent);
     procedure SetOnEditUTF8KeyPress(AValue: TUTF8KeyPressEvent);
     procedure SetOnEditUTF8KeyPress(AValue: TUTF8KeyPressEvent);
   protected
   protected
     function GetEditAlignment: TAlignment;
     function GetEditAlignment: TAlignment;
@@ -75,8 +63,6 @@ type
     function GetEditCharCase: TEditCharCase;
     function GetEditCharCase: TEditCharCase;
     function GetEditCursor: TCursor;
     function GetEditCursor: TCursor;
     function GetEditDoubleBuffered: Boolean;
     function GetEditDoubleBuffered: Boolean;
-    function GetEditDragCursor: TCursor;
-    function GetEditDragMode: TDragMode;
     function GetEditEchoMode: TEchoMode;
     function GetEditEchoMode: TEchoMode;
     function GetEditHideSelection: Boolean;
     function GetEditHideSelection: Boolean;
     function GetEditHint: TTranslateString;
     function GetEditHint: TTranslateString;
@@ -95,14 +81,13 @@ type
     function GetLabelSpacing: Integer;
     function GetLabelSpacing: Integer;
 
 
     procedure SetAnchors(const AValue: TAnchors); override;
     procedure SetAnchors(const AValue: TAnchors); override;
+    procedure SetColor(AValue: TColor); override;
     procedure SetEditAlignment(const AValue: TAlignment);
     procedure SetEditAlignment(const AValue: TAlignment);
     procedure SetEditAutoSize(AValue: Boolean);
     procedure SetEditAutoSize(AValue: Boolean);
     procedure SetEditAutoSelect(AValue: Boolean);
     procedure SetEditAutoSelect(AValue: Boolean);
     procedure SetEditCharCase(AValue: TEditCharCase);
     procedure SetEditCharCase(AValue: TEditCharCase);
     procedure SetEditCursor(AValue: TCursor);
     procedure SetEditCursor(AValue: TCursor);
     procedure SetEditDoubleBuffered(AValue: Boolean);
     procedure SetEditDoubleBuffered(AValue: Boolean);
-    procedure SetEditDragCursor(AValue: TCursor);
-    procedure SetEditDragMode(AValue: TDragMode);
     procedure SetEditEchoMode(AValue: TEchoMode);
     procedure SetEditEchoMode(AValue: TEchoMode);
     procedure SetEditHideSelection(AValue: Boolean);
     procedure SetEditHideSelection(AValue: Boolean);
     procedure SetEditHint(const AValue: TTranslateString);
     procedure SetEditHint(const AValue: TTranslateString);
@@ -143,13 +128,10 @@ type
     property Cursor: TCursor read GetEditCursor write SetEditCursor default crDefault;
     property Cursor: TCursor read GetEditCursor write SetEditCursor default crDefault;
     property DisabledColor: TColor read FDisabledColor write FDisabledColor;
     property DisabledColor: TColor read FDisabledColor write FDisabledColor;
     property DoubleBuffered: Boolean read GetEditDoubleBuffered write SetEditDoubleBuffered;
     property DoubleBuffered: Boolean read GetEditDoubleBuffered write SetEditDoubleBuffered;
-    property DragCursor: TCursor read GetEditDragCursor write SetEditDragCursor default crDrag;
-    property DragMode: TDragMode read GetEditDragMode write SetEditDragMode default dmManual;
-    property Font;
     property EchoMode: TEchoMode read GetEditEchoMode write SetEditEchoMode default emNormal;
     property EchoMode: TEchoMode read GetEditEchoMode write SetEditEchoMode default emNormal;
-    property Edit: TEdit read FEdit;
     property EditLabel: TBoundLabel read FLabel;
     property EditLabel: TBoundLabel read FLabel;
     property Enabled;
     property Enabled;
+    property Font;
     property HideSelection: Boolean read GetEditHideSelection write SetEditHideSelection default True;
     property HideSelection: Boolean read GetEditHideSelection write SetEditHideSelection default True;
     property Hint: TTranslateString read GetEditHint write SetEditHint;
     property Hint: TTranslateString read GetEditHint write SetEditHint;
     property LabelSpacing: Integer read GetLabelSpacing write SetLabelSpacing default 0;
     property LabelSpacing: Integer read GetLabelSpacing write SetLabelSpacing default 0;
@@ -172,12 +154,7 @@ type
     property OnChange: TNotifyEvent read GetOnEditChange write SetOnEditChange;
     property OnChange: TNotifyEvent read GetOnEditChange write SetOnEditChange;
     property OnChangeBounds;
     property OnChangeBounds;
     property OnClick: TNotifyEvent read GetOnEditClick write SetOnEditClick;
     property OnClick: TNotifyEvent read GetOnEditClick write SetOnEditClick;
-    property OnContextPopup: TContextPopupEvent read GetOnEditContextPopup write SetOnEditContextPopup;
-    property OnDbClick: TNotifyEvent read GetOnEditDblClick write SetOnEditDblClick;
-    property OnDragDrop: TDragDropEvent read GetOnEditDragDrop write SetOnEditDragDrop;
-    property OnDragOver: TDragOverEvent read GetOnEditDragOver write SetOnEditDragOver;
     property OnEditingDone: TNotifyEvent read GetOnEditEditingDone write SetOnEditEditingDone;
     property OnEditingDone: TNotifyEvent read GetOnEditEditingDone write SetOnEditEditingDone;
-    property OnEndDrag: TEndDragEvent read GetOnEditEndDrag write SetOnEditEndDrag;
     property OnEnter: TNotifyEvent read GetOnEditEnter write SetOnEditEnter;
     property OnEnter: TNotifyEvent read GetOnEditEnter write SetOnEditEnter;
     property OnExit: TNotifyEvent read GetOnEditExit write SetOnEditExit;
     property OnExit: TNotifyEvent read GetOnEditExit write SetOnEditExit;
     property OnKeyDown: TKeyEvent read GetOnEditKeyDown write SetOnEditKeyDown;
     property OnKeyDown: TKeyEvent read GetOnEditKeyDown write SetOnEditKeyDown;
@@ -192,10 +169,101 @@ type
     property OnMouseWheelDown: TMouseWheelUpDownEvent read GetOnEditMouseWheelDown write SetOnEditMouseWheelDown;
     property OnMouseWheelDown: TMouseWheelUpDownEvent read GetOnEditMouseWheelDown write SetOnEditMouseWheelDown;
     property OnMouseWheelUp: TMouseWheelUpDownEvent read GetOnEditMouseWheelUp write SetOnEditMouseWheelUp;
     property OnMouseWheelUp: TMouseWheelUpDownEvent read GetOnEditMouseWheelUp write SetOnEditMouseWheelUp;
     property OnResize;
     property OnResize;
-    property OnStartDrag: TStartDragEvent read GetOnEditStartDrag write SetOnEditStartDrag;
     property OnUTF8KeyPress: TUTF8KeyPressEvent read GetOnEditUTF8KeyPress write SetOnEditUTF8KeyPress;
     property OnUTF8KeyPress: TUTF8KeyPressEvent read GetOnEditUTF8KeyPress write SetOnEditUTF8KeyPress;
   end;
   end;
 
 
+  { TBCMaterialEdit }
+
+  TBCMaterialEdit = class(specialize TBCMaterialEditBase<TEdit>)
+  private
+    function GetEditDragCursor: TCursor;
+    function GetEditDragMode: TDragMode;
+
+    function GetOnEditContextPopup: TContextPopupEvent;
+    function GetOnEditDblClick: TNotifyEvent;
+    function GetOnEditDragDrop: TDragDropEvent;
+    function GetOnEditDragOver: TDragOverEvent;
+    function GetOnEditEndDrag: TEndDragEvent;
+    function GetOnEditStartDrag: TStartDragEvent;
+
+    procedure SetEditDragCursor(AValue: TCursor);
+    procedure SetEditDragMode(AValue: TDragMode);
+
+    procedure SetOnEditContextPopup(AValue: TContextPopupEvent);
+    procedure SetOnEditDblClick(AValue: TNotifyEvent);
+    procedure SetOnEditDragDrop(AValue: TDragDropEvent);
+    procedure SetOnEditDragOver(AValue: TDragOverEvent);
+    procedure SetOnEditEndDrag(AValue: TEndDragEvent);
+    procedure SetOnEditStartDrag(AValue: TStartDragEvent);
+  published
+    property Align;
+    property Alignment;
+    property AccentColor;
+    property Anchors;
+    property AutoSelect;
+    property AutoSize;
+    property BiDiMode;
+    property BorderSpacing;
+    property Caption;
+    property CharCase;
+    property Color;
+    property Constraints;
+    property Cursor;
+    property DisabledColor;
+    property DoubleBuffered;
+    property DragCursor: TCursor read GetEditDragCursor write SetEditDragCursor default crDrag;
+    property DragMode: TDragMode read GetEditDragMode write SetEditDragMode default dmManual;
+    property Font;
+    property EchoMode;
+    property Edit: TEdit read FEdit;
+    property EditLabel;
+    property Enabled;
+    property HideSelection;
+    property Hint;
+    property LabelSpacing;
+    property MaxLength;
+    property NumbersOnly;
+    property ParentBiDiMode;
+    property ParentColor;
+    property ParentFont;
+    property PasswordChar;
+    property PopupMenu;
+    property ReadOnly;
+    property ShowHint;
+    property Tag;
+    property TabOrder;
+    property TabStop;
+    property Text;
+    property TextHint;
+    property Visible;
+
+    property OnChange;
+    property OnChangeBounds;
+    property OnClick;
+    property OnContextPopup;
+    property OnDbClick: TNotifyEvent read GetOnEditDblClick write SetOnEditDblClick;
+    property OnDragDrop: TDragDropEvent read GetOnEditDragDrop write SetOnEditDragDrop;
+    property OnDragOver: TDragOverEvent read GetOnEditDragOver write SetOnEditDragOver;
+    property OnEditingDone;
+    property OnEndDrag: TEndDragEvent read GetOnEditEndDrag write SetOnEditEndDrag;
+    property OnEnter;
+    property OnExit;
+    property OnKeyDown;
+    property OnKeyPress;
+    property OnKeyUp;
+    property OnMouseDown;
+    property OnMouseEnter;
+    property OnMouseLeave;
+    property OnMouseMove;
+    property OnMouseUp;
+    property OnMouseWheel;
+    property OnMouseWheelDown;
+    property OnMouseWheelUp;
+    property OnResize;
+    property OnStartDrag: TStartDragEvent read GetOnEditStartDrag write SetOnEditStartDrag;
+    property OnUTF8KeyPress;
+  end;
+
 procedure Register;
 procedure Register;
 
 
 implementation
 implementation
@@ -208,368 +276,298 @@ begin
   RegisterComponents('BGRA Controls', [TBCMaterialEdit]);
   RegisterComponents('BGRA Controls', [TBCMaterialEdit]);
 end;
 end;
 
 
-{ TBCMaterialEdit }
+{ TBCMaterialEditBase }
 
 
-function TBCMaterialEdit.GetEditAlignment: TAlignment;
+function TBCMaterialEditBase.GetEditAlignment: TAlignment;
 begin
 begin
   result := FEdit.Alignment;
   result := FEdit.Alignment;
 end;
 end;
 
 
-function TBCMaterialEdit.GetEditAutoSize: Boolean;
+function TBCMaterialEditBase.GetEditAutoSize: Boolean;
 begin
 begin
   result := FEdit.AutoSize;
   result := FEdit.AutoSize;
 end;
 end;
 
 
-function TBCMaterialEdit.GetEditAutoSelect: Boolean;
+function TBCMaterialEditBase.GetEditAutoSelect: Boolean;
 begin
 begin
   result := FEdit.AutoSelect;
   result := FEdit.AutoSelect;
 end;
 end;
 
 
-function TBCMaterialEdit.GetLabelCaption: TCaption;
-begin
-  result := FLabel.Caption
-end;
-
-function TBCMaterialEdit.GetEditCharCase: TEditCharCase;
+function TBCMaterialEditBase.GetEditCharCase: TEditCharCase;
 begin
 begin
   result := FEdit.CharCase;
   result := FEdit.CharCase;
 end;
 end;
 
 
-function TBCMaterialEdit.GetEditCursor: TCursor;
+function TBCMaterialEditBase.GetEditCursor: TCursor;
 begin
 begin
   result := FEdit.Cursor;
   result := FEdit.Cursor;
 end;
 end;
 
 
-function TBCMaterialEdit.GetEditDoubleBuffered: Boolean;
+function TBCMaterialEditBase.GetEditDoubleBuffered: Boolean;
 begin
 begin
   result := FEdit.DoubleBuffered;
   result := FEdit.DoubleBuffered;
 end;
 end;
 
 
-function TBCMaterialEdit.GetEditDragCursor: TCursor;
-begin
-  result := FEdit.DragCursor;
-end;
-
-function TBCMaterialEdit.GetEditDragMode: TDragMode;
-begin
-  result := FEdit.DragMode;
-end;
-
-function TBCMaterialEdit.GetEditEchoMode: TEchoMode;
+function TBCMaterialEditBase.GetEditEchoMode: TEchoMode;
 begin
 begin
   result := FEdit.EchoMode;
   result := FEdit.EchoMode;
 end;
 end;
 
 
-function TBCMaterialEdit.GetEditHideSelection: Boolean;
+function TBCMaterialEditBase.GetEditHideSelection: Boolean;
 begin
 begin
   result := FEdit.HideSelection;
   result := FEdit.HideSelection;
 end;
 end;
 
 
-function TBCMaterialEdit.GetEditHint: TTranslateString;
+function TBCMaterialEditBase.GetEditHint: TTranslateString;
 begin
 begin
   result := FEdit.Hint;
   result := FEdit.Hint;
 end;
 end;
 
 
-function TBCMaterialEdit.GetEditMaxLength: Integer;
+function TBCMaterialEditBase.GetEditMaxLength: Integer;
 begin
 begin
   result := FEdit.MaxLength;
   result := FEdit.MaxLength;
 end;
 end;
 
 
-function TBCMaterialEdit.GetEditNumbersOnly: Boolean;
+function TBCMaterialEditBase.GetEditNumbersOnly: Boolean;
 begin
 begin
   result := FEdit.NumbersOnly;
   result := FEdit.NumbersOnly;
 end;
 end;
 
 
-function TBCMaterialEdit.GetEditPasswordChar: Char;
+function TBCMaterialEditBase.GetEditPasswordChar: Char;
 begin
 begin
   result := FEdit.PasswordChar;
   result := FEdit.PasswordChar;
 end;
 end;
 
 
-function TBCMaterialEdit.GetEditParentColor: Boolean;
+function TBCMaterialEditBase.GetEditParentColor: Boolean;
 begin
 begin
   Result := Self.ParentColor;
   Result := Self.ParentColor;
 end;
 end;
 
 
-function TBCMaterialEdit.GetEditPopupMenu: TPopupMenu;
+function TBCMaterialEditBase.GetEditPopupMenu: TPopupMenu;
 begin
 begin
   if (csDestroying in ComponentState) then Exit(nil);
   if (csDestroying in ComponentState) then Exit(nil);
 
 
   result := FEdit.PopupMenu;
   result := FEdit.PopupMenu;
 end;
 end;
 
 
-function TBCMaterialEdit.GetEditReadOnly: Boolean;
+function TBCMaterialEditBase.GetEditReadOnly: Boolean;
 begin
 begin
   result := FEdit.ReadOnly;
   result := FEdit.ReadOnly;
 end;
 end;
 
 
-function TBCMaterialEdit.GetEditShowHint: Boolean;
+function TBCMaterialEditBase.GetEditShowHint: Boolean;
 begin
 begin
   result := FEdit.ShowHint;
   result := FEdit.ShowHint;
 end;
 end;
 
 
-function TBCMaterialEdit.GetEditTag: PtrInt;
+function TBCMaterialEditBase.GetEditTag: PtrInt;
 begin
 begin
   result := FEdit.Tag;
   result := FEdit.Tag;
 end;
 end;
 
 
-function TBCMaterialEdit.GetEditTabStop: Boolean;
+function TBCMaterialEditBase.GetEditTabStop: Boolean;
 begin
 begin
   result := FEdit.TabStop;
   result := FEdit.TabStop;
 end;
 end;
 
 
-function TBCMaterialEdit.GetEditText: TCaption;
+function TBCMaterialEditBase.GetEditText: TCaption;
 begin
 begin
   result := FEdit.Text;
   result := FEdit.Text;
 end;
 end;
 
 
-function TBCMaterialEdit.GetEditTextHint: TCaption;
+function TBCMaterialEditBase.GetEditTextHint: TCaption;
 begin
 begin
   result := FEdit.TextHint;
   result := FEdit.TextHint;
 end;
 end;
 
 
-function TBCMaterialEdit.GetLabelSpacing: Integer;
-begin
-  result := FLabel.BorderSpacing.Bottom;
-end;
-
-function TBCMaterialEdit.GetOnEditChange: TNotifyEvent;
-begin
-  result := FEdit.OnChange;
-end;
-
-function TBCMaterialEdit.GetOnEditClick: TNotifyEvent;
+function TBCMaterialEditBase.GetLabelCaption: TCaption;
 begin
 begin
-  result := FEdit.OnClick;
+  result := FLabel.Caption
 end;
 end;
 
 
-function TBCMaterialEdit.GetOnEditContextPopup: TContextPopupEvent;
+function TBCMaterialEditBase.GetLabelSpacing: Integer;
 begin
 begin
-  result := FEdit.OnContextPopup;
+  result := FLabel.BorderSpacing.Bottom;
 end;
 end;
 
 
-function TBCMaterialEdit.GetOnEditDblClick: TNotifyEvent;
+function TBCMaterialEditBase.GetOnEditChange: TNotifyEvent;
 begin
 begin
-  result := FEdit.OnDblClick;
+  result := FEdit.OnChange;
 end;
 end;
 
 
-function TBCMaterialEdit.GetOnEditDragDrop: TDragDropEvent;
+function TBCMaterialEditBase.GetOnEditClick: TNotifyEvent;
 begin
 begin
-  result := FEdit.OnDragDrop;
-end;
-
-function TBCMaterialEdit.GetOnEditDragOver: TDragOverEvent;
-begin
-  result := FEdit.OnDragOver;
+  result := FEdit.OnClick;
 end;
 end;
 
 
-function TBCMaterialEdit.GetOnEditEditingDone: TNotifyEvent;
+function TBCMaterialEditBase.GetOnEditEditingDone: TNotifyEvent;
 begin
 begin
   result := FEdit.OnEditingDone;
   result := FEdit.OnEditingDone;
 end;
 end;
 
 
-function TBCMaterialEdit.GetOnEditEndDrag: TEndDragEvent;
-begin
-  result := FEdit.OnEndDrag;
-end;
-
-function TBCMaterialEdit.GetOnEditEnter: TNotifyEvent;
+function TBCMaterialEditBase.GetOnEditEnter: TNotifyEvent;
 begin
 begin
   result := FEdit.OnEnter;
   result := FEdit.OnEnter;
 end;
 end;
 
 
-function TBCMaterialEdit.GetOnEditExit: TNotifyEvent;
+function TBCMaterialEditBase.GetOnEditExit: TNotifyEvent;
 begin
 begin
   result := FEdit.OnExit;
   result := FEdit.OnExit;
 end;
 end;
 
 
-function TBCMaterialEdit.GetOnEditKeyDown: TKeyEvent;
+function TBCMaterialEditBase.GetOnEditKeyDown: TKeyEvent;
 begin
 begin
   result := FEdit.OnKeyDown;
   result := FEdit.OnKeyDown;
 end;
 end;
 
 
-function TBCMaterialEdit.GetOnEditKeyPress: TKeyPressEvent;
+function TBCMaterialEditBase.GetOnEditKeyPress: TKeyPressEvent;
 begin
 begin
   result := FEdit.OnKeyPress;
   result := FEdit.OnKeyPress;
 end;
 end;
 
 
-function TBCMaterialEdit.GetOnEditKeyUp: TKeyEvent;
+function TBCMaterialEditBase.GetOnEditKeyUp: TKeyEvent;
 begin
 begin
   result := FEdit.OnKeyUp;
   result := FEdit.OnKeyUp;
 end;
 end;
 
 
-function TBCMaterialEdit.GetOnEditMouseDown: TMouseEvent;
+function TBCMaterialEditBase.GetOnEditMouseDown: TMouseEvent;
 begin
 begin
   result := FEdit.OnMouseDown;
   result := FEdit.OnMouseDown;
 end;
 end;
 
 
-function TBCMaterialEdit.GetOnEditMouseEnter: TNotifyEvent;
+function TBCMaterialEditBase.GetOnEditMouseEnter: TNotifyEvent;
 begin
 begin
   result := FEdit.OnMouseEnter;
   result := FEdit.OnMouseEnter;
 end;
 end;
 
 
-function TBCMaterialEdit.GetOnEditMouseLeave: TNotifyEvent;
+function TBCMaterialEditBase.GetOnEditMouseLeave: TNotifyEvent;
 begin
 begin
   result := FEdit.OnMouseLeave;
   result := FEdit.OnMouseLeave;
 end;
 end;
 
 
-function TBCMaterialEdit.GetOnEditMouseMove: TMouseMoveEvent;
+function TBCMaterialEditBase.GetOnEditMouseMove: TMouseMoveEvent;
 begin
 begin
   result := FEdit.OnMouseMove;
   result := FEdit.OnMouseMove;
 end;
 end;
 
 
-function TBCMaterialEdit.GetOnEditMouseUp: TMouseEvent;
+function TBCMaterialEditBase.GetOnEditMouseUp: TMouseEvent;
 begin
 begin
   result := FEdit.OnMouseUp;
   result := FEdit.OnMouseUp;
 end;
 end;
 
 
-function TBCMaterialEdit.GetOnEditMouseWheel: TMouseWheelEvent;
+function TBCMaterialEditBase.GetOnEditMouseWheel: TMouseWheelEvent;
 begin
 begin
   result := FEdit.OnMouseWheel;
   result := FEdit.OnMouseWheel;
 end;
 end;
 
 
-function TBCMaterialEdit.GetOnEditMouseWheelDown: TMouseWheelUpDownEvent;
+function TBCMaterialEditBase.GetOnEditMouseWheelDown: TMouseWheelUpDownEvent;
 begin
 begin
   result := FEdit.OnMouseWheelDown;
   result := FEdit.OnMouseWheelDown;
 end;
 end;
 
 
-function TBCMaterialEdit.GetOnEditMouseWheelUp: TMouseWheelUpDownEvent;
+function TBCMaterialEditBase.GetOnEditMouseWheelUp: TMouseWheelUpDownEvent;
 begin
 begin
   result := FEdit.OnMouseWheelUp;
   result := FEdit.OnMouseWheelUp;
 end;
 end;
 
 
-function TBCMaterialEdit.GetOnEditStartDrag: TStartDragEvent;
-begin
-  result := FEdit.OnStartDrag;
-end;
-
-function TBCMaterialEdit.GetOnEditUTF8KeyPress: TUTF8KeyPressEvent;
+function TBCMaterialEditBase.GetOnEditUTF8KeyPress: TUTF8KeyPressEvent;
 begin
 begin
   result := FEdit.OnUTF8KeyPress;
   result := FEdit.OnUTF8KeyPress;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetOnEditChange(AValue: TNotifyEvent);
+procedure TBCMaterialEditBase.SetOnEditChange(AValue: TNotifyEvent);
 begin
 begin
   FEdit.OnChange := AValue;
   FEdit.OnChange := AValue;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetOnEditClick(AValue: TNotifyEvent);
+procedure TBCMaterialEditBase.SetOnEditClick(AValue: TNotifyEvent);
 begin
 begin
   FEdit.OnClick := AValue;
   FEdit.OnClick := AValue;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetOnEditContextPopup(AValue: TContextPopupEvent);
-begin
-  FEdit.OnContextPopup := AValue;
-end;
-
-procedure TBCMaterialEdit.SetOnEditDblClick(AValue: TNotifyEvent);
-begin
-  FEdit.OnDblClick := AValue;
-end;
-
-procedure TBCMaterialEdit.SetOnEditDragDrop(AValue: TDragDropEvent);
-begin
-  FEdit.OnDragDrop := AValue;
-end;
-
-procedure TBCMaterialEdit.SetOnEditDragOver(AValue: TDragOverEvent);
-begin
-  FEdit.OnDragOver := AValue;
-end;
-
-procedure TBCMaterialEdit.SetOnEditEditingDone(AValue: TNotifyEvent);
+procedure TBCMaterialEditBase.SetOnEditEditingDone(AValue: TNotifyEvent);
 begin
 begin
   FEdit.OnEditingDone := AValue;
   FEdit.OnEditingDone := AValue;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetOnEditEndDrag(AValue: TEndDragEvent);
-begin
-  FEdit.OnEndDrag := AValue;
-end;
-
-procedure TBCMaterialEdit.SetOnEditEnter(AValue: TNotifyEvent);
+procedure TBCMaterialEditBase.SetOnEditEnter(AValue: TNotifyEvent);
 begin
 begin
   FEdit.OnEnter := AValue;
   FEdit.OnEnter := AValue;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetOnEditExit(AValue: TNotifyEvent);
+procedure TBCMaterialEditBase.SetOnEditExit(AValue: TNotifyEvent);
 begin
 begin
   FEdit.OnExit := AValue;
   FEdit.OnExit := AValue;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetOnEditKeyDown(AValue: TKeyEvent);
+procedure TBCMaterialEditBase.SetOnEditKeyDown(AValue: TKeyEvent);
 begin
 begin
   FEdit.OnKeyDown := AValue;
   FEdit.OnKeyDown := AValue;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetOnEditKeyPress(AValue: TKeyPressEvent);
+procedure TBCMaterialEditBase.SetOnEditKeyPress(AValue: TKeyPressEvent);
 begin
 begin
   FEdit.OnKeyPress := AValue;
   FEdit.OnKeyPress := AValue;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetOnEditKeyUp(AValue: TKeyEvent);
+procedure TBCMaterialEditBase.SetOnEditKeyUp(AValue: TKeyEvent);
 begin
 begin
   FEdit.OnKeyUp := AValue;
   FEdit.OnKeyUp := AValue;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetOnEditMouseDown(AValue: TMouseEvent);
+procedure TBCMaterialEditBase.SetOnEditMouseDown(AValue: TMouseEvent);
 begin
 begin
   FEdit.OnMouseDown := AValue;
   FEdit.OnMouseDown := AValue;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetOnEditMouseEnter(AValue: TNotifyEvent);
+procedure TBCMaterialEditBase.SetOnEditMouseEnter(AValue: TNotifyEvent);
 begin
 begin
   FEdit.OnMouseEnter := AValue;
   FEdit.OnMouseEnter := AValue;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetOnEditMouseLeave(AValue: TNotifyEvent);
+procedure TBCMaterialEditBase.SetOnEditMouseLeave(AValue: TNotifyEvent);
 begin
 begin
   FEdit.OnMouseLeave := AValue;
   FEdit.OnMouseLeave := AValue;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetOnEditMouseMove(AValue: TMouseMoveEvent);
+procedure TBCMaterialEditBase.SetOnEditMouseMove(AValue: TMouseMoveEvent);
 begin
 begin
   FEdit.OnMouseMove := AValue;
   FEdit.OnMouseMove := AValue;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetOnEditMouseUp(AValue: TMouseEvent);
+procedure TBCMaterialEditBase.SetOnEditMouseUp(AValue: TMouseEvent);
 begin
 begin
   FEdit.OnMouseUp := AValue;
   FEdit.OnMouseUp := AValue;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetOnEditMouseWheel(AValue: TMouseWheelEvent);
+procedure TBCMaterialEditBase.SetOnEditMouseWheel(AValue: TMouseWheelEvent);
 begin
 begin
   FEdit.OnMouseWheel := AValue;
   FEdit.OnMouseWheel := AValue;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetOnEditMouseWheelDown(AValue: TMouseWheelUpDownEvent);
+procedure TBCMaterialEditBase.SetOnEditMouseWheelDown(AValue: TMouseWheelUpDownEvent);
 begin
 begin
   FEdit.OnMouseWheelDown := AValue;
   FEdit.OnMouseWheelDown := AValue;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetOnEditMouseWheelUp(AValue: TMouseWheelUpDownEvent);
+procedure TBCMaterialEditBase.SetOnEditMouseWheelUp(AValue: TMouseWheelUpDownEvent);
 begin
 begin
   FEdit.OnMouseWheelUp := AValue;
   FEdit.OnMouseWheelUp := AValue;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetOnEditStartDrag(AValue: TStartDragEvent);
-begin
-  FEdit.OnStartDrag := AValue;
-end;
-
-procedure TBCMaterialEdit.SetOnEditUTF8KeyPress(AValue: TUTF8KeyPressEvent);
+procedure TBCMaterialEditBase.SetOnEditUTF8KeyPress(AValue: TUTF8KeyPressEvent);
 begin
 begin
   FEdit.OnUTF8KeyPress := AValue;
   FEdit.OnUTF8KeyPress := AValue;
 end;
 end;
 
 
-function TBCMaterialEdit.IsNeededAdjustSize: boolean;
+function TBCMaterialEditBase.IsNeededAdjustSize: boolean;
 begin
 begin
   if (Self.Align in [alLeft, alRight, alClient]) then Exit(False);
   if (Self.Align in [alLeft, alRight, alClient]) then Exit(False);
   if (akTop in Self.Anchors) and (akBottom in Self.Anchors) then Exit(False);
   if (akTop in Self.Anchors) and (akBottom in Self.Anchors) then Exit(False);
   result := FEdit.AutoSize;
   result := FEdit.AutoSize;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetAnchors(const AValue: TAnchors);
+procedure TBCMaterialEditBase.SetAnchors(const AValue: TAnchors);
 begin
 begin
   if (Self.Anchors = AValue) then Exit;
   if (Self.Anchors = AValue) then Exit;
   inherited SetAnchors(AValue);
   inherited SetAnchors(AValue);
@@ -577,12 +575,18 @@ begin
   if not (csLoading in ComponentState) then Self.DoOnResize;
   if not (csLoading in ComponentState) then Self.DoOnResize;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetEditAlignment(const AValue: TAlignment);
+procedure TBCMaterialEditBase.SetColor(AValue: TColor);
+begin
+  inherited SetColor(AValue);
+  FEdit.Color := AValue;
+end;
+
+procedure TBCMaterialEditBase.SetEditAlignment(const AValue: TAlignment);
 begin
 begin
   FEdit.Alignment := AValue;
   FEdit.Alignment := AValue;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetEditAutoSize(AValue: Boolean);
+procedure TBCMaterialEditBase.SetEditAutoSize(AValue: Boolean);
 begin
 begin
   if (FEdit.AutoSize = AValue) then Exit;
   if (FEdit.AutoSize = AValue) then Exit;
   FEdit.AutoSize := AValue;
   FEdit.AutoSize := AValue;
@@ -590,113 +594,103 @@ begin
   if not (csLoading in ComponentState) then Self.DoOnResize;
   if not (csLoading in ComponentState) then Self.DoOnResize;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetEditAutoSelect(AValue: Boolean);
+procedure TBCMaterialEditBase.SetEditAutoSelect(AValue: Boolean);
 begin
 begin
   FEdit.AutoSelect := AValue;
   FEdit.AutoSelect := AValue;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetEditCharCase(AValue: TEditCharCase);
+procedure TBCMaterialEditBase.SetEditCharCase(AValue: TEditCharCase);
 begin
 begin
   FEdit.CharCase := AValue;
   FEdit.CharCase := AValue;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetEditCursor(AValue: TCursor);
+procedure TBCMaterialEditBase.SetEditCursor(AValue: TCursor);
 begin
 begin
   FEdit.Cursor := AValue;
   FEdit.Cursor := AValue;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetEditDoubleBuffered(AValue: Boolean);
+procedure TBCMaterialEditBase.SetEditDoubleBuffered(AValue: Boolean);
 begin
 begin
   FEdit.DoubleBuffered := AValue;
   FEdit.DoubleBuffered := AValue;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetEditDragCursor(AValue: TCursor);
-begin
-  FEdit.DragCursor := AValue;
-end;
-
-procedure TBCMaterialEdit.SetEditDragMode(AValue: TDragMode);
-begin
-  FEdit.DragMode := AValue;
-end;
-
-procedure TBCMaterialEdit.SetEditEchoMode(AValue: TEchoMode);
+procedure TBCMaterialEditBase.SetEditEchoMode(AValue: TEchoMode);
 begin
 begin
   FEdit.EchoMode := AValue;
   FEdit.EchoMode := AValue;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetEditHideSelection(AValue: Boolean);
+procedure TBCMaterialEditBase.SetEditHideSelection(AValue: Boolean);
 begin
 begin
   FEdit.HideSelection := AValue;
   FEdit.HideSelection := AValue;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetEditHint(const AValue: TTranslateString);
+procedure TBCMaterialEditBase.SetEditHint(const AValue: TTranslateString);
 begin
 begin
   FEdit.Hint := AValue;
   FEdit.Hint := AValue;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetEditMaxLength(AValue: Integer);
+procedure TBCMaterialEditBase.SetEditMaxLength(AValue: Integer);
 begin
 begin
   FEdit.MaxLength := AValue;
   FEdit.MaxLength := AValue;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetEditNumbersOnly(AValue: Boolean);
+procedure TBCMaterialEditBase.SetEditNumbersOnly(AValue: Boolean);
 begin
 begin
   FEdit.NumbersOnly := AValue;
   FEdit.NumbersOnly := AValue;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetEditParentColor(AValue: Boolean);
+procedure TBCMaterialEditBase.SetEditParentColor(AValue: Boolean);
 begin
 begin
   FEdit.ParentColor  := AValue;
   FEdit.ParentColor  := AValue;
   FLabel.ParentColor := AValue;
   FLabel.ParentColor := AValue;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetEditPasswordChar(AValue: Char);
+procedure TBCMaterialEditBase.SetEditPasswordChar(AValue: Char);
 begin
 begin
   FEdit.PasswordChar := AValue;
   FEdit.PasswordChar := AValue;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetEditTabStop(AValue: Boolean);
+procedure TBCMaterialEditBase.SetEditTabStop(AValue: Boolean);
 begin
 begin
   FEdit.TabStop := AValue;
   FEdit.TabStop := AValue;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetEditPopupMenu(AValue: TPopupmenu);
+procedure TBCMaterialEditBase.SetEditPopupMenu(AValue: TPopupmenu);
 begin
 begin
   FEdit.PopupMenu := AValue;
   FEdit.PopupMenu := AValue;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetEditReadOnly(AValue: Boolean);
+procedure TBCMaterialEditBase.SetEditReadOnly(AValue: Boolean);
 begin
 begin
   FEdit.ReadOnly := AValue;
   FEdit.ReadOnly := AValue;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetEditShowHint(AValue: Boolean);
+procedure TBCMaterialEditBase.SetEditShowHint(AValue: Boolean);
 begin
 begin
   FEdit.ShowHint := AValue;
   FEdit.ShowHint := AValue;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetEditTag(AValue: PtrInt);
+procedure TBCMaterialEditBase.SetEditTag(AValue: PtrInt);
 begin
 begin
   FEdit.Tag := AValue;
   FEdit.Tag := AValue;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetEditTextHint(const Avalue: TTranslateString);
+procedure TBCMaterialEditBase.SetEditTextHint(const Avalue: TTranslateString);
 begin
 begin
   FEdit.TextHint := AValue;
   FEdit.TextHint := AValue;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetEditText(const AValue: TCaption);
+procedure TBCMaterialEditBase.SetEditText(const AValue: TCaption);
 begin
 begin
   FEdit.Text := AValue;
   FEdit.Text := AValue;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetLabelCaption(const AValue: TCaption);
+procedure TBCMaterialEditBase.SetLabelCaption(const AValue: TCaption);
 begin
 begin
   FLabel.Caption := AValue;
   FLabel.Caption := AValue;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetLabelSpacing(AValue: Integer);
+procedure TBCMaterialEditBase.SetLabelSpacing(AValue: Integer);
 begin
 begin
   if (FLabel.BorderSpacing.Bottom = AValue) then Exit;
   if (FLabel.BorderSpacing.Bottom = AValue) then Exit;
   FLabel.BorderSpacing.Bottom := AValue;
   FLabel.BorderSpacing.Bottom := AValue;
@@ -704,7 +698,7 @@ begin
   if not (csLoading in ComponentState) then Self.DoOnResize;
   if not (csLoading in ComponentState) then Self.DoOnResize;
 end;
 end;
 
 
-procedure TBCMaterialEdit.SetName(const AValue: TComponentName);
+procedure TBCMaterialEditBase.SetName(const AValue: TComponentName);
 begin
 begin
   if (csDesigning in ComponentState) then
   if (csDesigning in ComponentState) then
   begin
   begin
@@ -723,23 +717,21 @@ begin
   inherited SetName(AValue);
   inherited SetName(AValue);
 end;
 end;
 
 
-procedure TBCMaterialEdit.DoEnter;
+procedure TBCMaterialEditBase.DoEnter;
 begin
 begin
   inherited DoEnter;
   inherited DoEnter;
   FFocused := True;
   FFocused := True;
   Invalidate;
   Invalidate;
-  FLabel.Font.Color := AccentColor;
 end;
 end;
 
 
-procedure TBCMaterialEdit.DoExit;
+procedure TBCMaterialEditBase.DoExit;
 begin
 begin
   FFocused := False;
   FFocused := False;
   Invalidate;
   Invalidate;
-  FLabel.Font.Color := DisabledColor;
   inherited DoExit;
   inherited DoExit;
 end;
 end;
 
 
-procedure TBCMaterialEdit.DoOnResize;
+procedure TBCMaterialEditBase.DoOnResize;
 var
 var
   AutoSizedHeight: longint;
   AutoSizedHeight: longint;
 begin
 begin
@@ -765,7 +757,7 @@ begin
   inherited DoOnResize;
   inherited DoOnResize;
 end;
 end;
 
 
-procedure TBCMaterialEdit.Paint;
+procedure TBCMaterialEditBase.Paint;
 var
 var
   LeftPos, RightPos: integer;
   LeftPos, RightPos: integer;
 begin
 begin
@@ -784,27 +776,31 @@ begin
     RightPos := Width;
     RightPos := Width;
   end;
   end;
 
 
-  if (FFocused) and (FEdit.Enabled) then
+  if (FFocused) and (Self.Enabled) then
   begin
   begin
     Canvas.Pen.Color := AccentColor;
     Canvas.Pen.Color := AccentColor;
     Canvas.Line(LeftPos, Height - 2, RightPos, Height - 2);
     Canvas.Line(LeftPos, Height - 2, RightPos, Height - 2);
     Canvas.Line(LeftPos, Height - 1, RightPos, Height - 1);
     Canvas.Line(LeftPos, Height - 1, RightPos, Height - 1);
+    FLabel.Font.Color := AccentColor;
   end else
   end else
   begin
   begin
     Canvas.Pen.Color := DisabledColor;
     Canvas.Pen.Color := DisabledColor;
     Canvas.Line(LeftPos, Height - 1, RightPos, Height - 1);
     Canvas.Line(LeftPos, Height - 1, RightPos, Height - 1);
+    FLabel.Font.Color := DisabledColor;
   end;
   end;
 end;
 end;
 
 
-constructor TBCMaterialEdit.Create(AOwner: TComponent);
+constructor TBCMaterialEditBase.Create(AOwner: TComponent);
 begin
 begin
+  FEdit := T.Create(nil);
+  FLabel := TBoundLabel.Create(nil);
   inherited Create(AOwner);
   inherited Create(AOwner);
   Self.AccentColor := clHighlight;
   Self.AccentColor := clHighlight;
   Self.BorderStyle := bsNone;
   Self.BorderStyle := bsNone;
   Self.Color := clWindow;
   Self.Color := clWindow;
   Self.DisabledColor := $00B8AFA8;
   Self.DisabledColor := $00B8AFA8;
   Self.ParentColor := False;
   Self.ParentColor := False;
-  FLabel := TBoundLabel.Create(Self);
+
   FLabel.Align := alTop;
   FLabel.Align := alTop;
   FLabel.AutoSize := True;
   FLabel.AutoSize := True;
   FLabel.BorderSpacing.Around := 0;
   FLabel.BorderSpacing.Around := 0;
@@ -818,7 +814,7 @@ begin
   FLabel.ParentFont := False;
   FLabel.ParentFont := False;
   FLabel.ParentBiDiMode := True;
   FLabel.ParentBiDiMode := True;
   FLabel.SetSubComponent(True);
   FLabel.SetSubComponent(True);
-  FEdit := TEdit.Create(Self);
+
   FEdit.Align := alBottom;
   FEdit.Align := alBottom;
   FEdit.AutoSelect := True;
   FEdit.AutoSelect := True;
   FEdit.AutoSize := True;
   FEdit.AutoSize := True;
@@ -837,4 +833,86 @@ begin
   FEdit.SetSubComponent(True);
   FEdit.SetSubComponent(True);
 end;
 end;
 
 
+{ TBCMaterialEdit }
+
+function TBCMaterialEdit.GetEditDragCursor: TCursor;
+begin
+  result := FEdit.DragCursor;
+end;
+
+function TBCMaterialEdit.GetEditDragMode: TDragMode;
+begin
+  result := FEdit.DragMode;
+end;
+
+function TBCMaterialEdit.GetOnEditContextPopup: TContextPopupEvent;
+begin
+  result := FEdit.OnContextPopup;
+end;
+
+function TBCMaterialEdit.GetOnEditDblClick: TNotifyEvent;
+begin
+  result := FEdit.OnDblClick;
+end;
+
+function TBCMaterialEdit.GetOnEditDragDrop: TDragDropEvent;
+begin
+  result := FEdit.OnDragDrop;
+end;
+
+function TBCMaterialEdit.GetOnEditDragOver: TDragOverEvent;
+begin
+  result := FEdit.OnDragOver;
+end;
+
+function TBCMaterialEdit.GetOnEditEndDrag: TEndDragEvent;
+begin
+  result := FEdit.OnEndDrag;
+end;
+
+function TBCMaterialEdit.GetOnEditStartDrag: TStartDragEvent;
+begin
+  result := FEdit.OnStartDrag;
+end;
+
+procedure TBCMaterialEdit.SetEditDragCursor(AValue: TCursor);
+begin
+  FEdit.DragCursor := AValue;
+end;
+
+procedure TBCMaterialEdit.SetEditDragMode(AValue: TDragMode);
+begin
+  FEdit.DragMode := AValue;
+end;
+
+procedure TBCMaterialEdit.SetOnEditContextPopup(AValue: TContextPopupEvent);
+begin
+  FEdit.OnContextPopup := AValue;
+end;
+
+procedure TBCMaterialEdit.SetOnEditDblClick(AValue: TNotifyEvent);
+begin
+  FEdit.OnDblClick := AValue;
+end;
+
+procedure TBCMaterialEdit.SetOnEditDragDrop(AValue: TDragDropEvent);
+begin
+  FEdit.OnDragDrop := AValue;
+end;
+
+procedure TBCMaterialEdit.SetOnEditDragOver(AValue: TDragOverEvent);
+begin
+  FEdit.OnDragOver := AValue;
+end;
+
+procedure TBCMaterialEdit.SetOnEditEndDrag(AValue: TEndDragEvent);
+begin
+  FEdit.OnEndDrag := AValue;
+end;
+
+procedure TBCMaterialEdit.SetOnEditStartDrag(AValue: TStartDragEvent);
+begin
+  FEdit.OnStartDrag := AValue;
+end;
+
 end.
 end.