Przeglądaj źródła

Fixed issue "TabOrder for BCMaterialEdit and others not working"...

Fixed the bug: "TabOrder for BCMaterialEdit and others not working" (#167).
Added properties and events for the TBCMaterialEdit component.
Melchiorre Caruso 11 miesięcy temu
rodzic
commit
2e5f65d87c

+ 799 - 62
bcmaterialedit.pas

@@ -1,42 +1,200 @@
 unit BCMaterialEdit;
 
-{$mode objfpc}{$H+}
+{$I bgracontrols.inc}
 
 interface
 
 uses
-  Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, ExtCtrls,
-  StdCtrls;
+  Classes, Controls, Dialogs, ExtCtrls, Forms, Graphics, {$IFDEF FPC} LCLType,
+  LResources, {$ENDIF} Menus, StdCtrls, SysUtils;
 
 type
 
   { TBCMaterialEdit }
 
-  TBCMaterialEdit = class(TCustomPanel)
+  TBCMaterialEdit = class(TCustomControl)
   private
     FAccentColor: TColor;
     FDisabledColor: TColor;
-    Flbl: TLabel;
-    Fedt: TEdit;
-    Ffocused: boolean;
-    FOnChange: TNotifyEvent;
-    FTexto: string;
-    procedure ChangeEdit(Sender: TObject);
-    procedure EnterEdit(Sender: TObject);
-    procedure ExitEdit(Sender: TObject);
-    procedure SetTexto(AValue: string);
+    FEdit: TEdit;
+    FLabel: TBoundLabel;
+    FFocused: boolean;
+    function IsNeededAdjustHeight: boolean;
+
+    function GetOnEditChange: TNotifyEvent;
+    function GetOnEditClick: TNotifyEvent;
+    function GetOnEditContextPopup: TContextPopupEvent;
+    function GetOnEditDblClick: TNotifyEvent;
+    function GetOnEditDragDrop: TDragDropEvent;
+    function GetOnEditDragOver: TDragOverEvent;
+    function GetOnEditEditingDone: TNotifyEvent;
+    function GetOnEditEndDrag: TEndDragEvent;
+    function GetOnEditEnter: TNotifyEvent;
+    function GetOnEditExit: TNotifyEvent;
+    function GetOnEditKeyDown: TKeyEvent;
+    function GetOnEditKeyPress: TKeyPressEvent;
+    function GetOnEditKeyUp: TKeyEvent;
+    function GetOnEditMouseDown: TMouseEvent;
+    function GetOnEditMouseEnter: TNotifyEvent;
+    function GetOnEditMouseLeave: TNotifyEvent;
+    function GetOnEditMouseMove: TMouseMoveEvent;
+    function GetOnEditMouseUp: TMouseEvent;
+    function GetOnEditMouseWheel: TMouseWheelEvent;
+    function GetOnEditMouseWheelDown: TMouseWheelUpDownEvent;
+    function GetOnEditMouseWheelUp: TMouseWheelUpDownEvent;
+    function GetOnEditStartDrag: TStartDragEvent;
+    function GetOnEditUTF8KeyPress: TUTF8KeyPressEvent;
+
+    procedure SetOnEditChange(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 SetOnEditEndDrag(AValue: TEndDragEvent);
+    procedure SetOnEditEnter(AValue: TNotifyEvent);
+    procedure SetOnEditExit(AValue: TNotifyEvent);
+    procedure SetOnEditKeyDown(AValue: TKeyEvent);
+    procedure SetOnEditKeyPress(AValue: TKeyPressEvent);
+    procedure SetOnEditKeyUp(AValue: TKeyEvent);
+    procedure SetOnEditMouseDown(AValue: TMouseEvent);
+    procedure SetOnEditMouseEnter(AValue: TNotifyEvent);
+    procedure SetOnEditMouseLeave(AValue: TNotifyEvent);
+    procedure SetOnEditMouseMove(AValue: TMouseMoveEvent);
+    procedure SetOnEditMouseUp(AValue: TMouseEvent);
+    procedure SetOnEditMouseWheel(AValue: TMouseWheelEvent);
+    procedure SetOnEditMouseWheelDown(AValue: TMouseWheelUpDownEvent);
+    procedure SetOnEditMouseWheelUp(AValue: TMouseWheelUpDownEvent);
+    procedure SetOnEditStartDrag(AValue: TStartDragEvent);
+    procedure SetOnEditUTF8KeyPress(AValue: TUTF8KeyPressEvent);
   protected
+    function GetEditAlignment: TAlignment;
+    function GetEditAutoSize: Boolean;
+    function GetEditAutoSelect: Boolean;
+
+    function GetEditCharCase: TEditCharCase;
+    function GetEditCursor: TCursor;
+    function GetEditDoubleBuffered: Boolean;
+    function GetEditDragCursor: TCursor;
+    function GetEditDragMode: TDragMode;
+    function GetEditEchoMode: TEchoMode;
+    function GetEditEnabled: boolean;
+    function GetEditHideSelection: Boolean;
+    function GetEditMaxLength: Integer;
+    function GetEditNumbersOnly: Boolean;
+    function GetEditPasswordChar: Char;
+    function GetEditParentColor: Boolean;
+    function GetEditPopupMenu: TPopupMenu;
+    function GetEditReadOnly: Boolean;
+    function GetEditShowHint: Boolean;
+    function GetEditTag: PtrInt;
+    function GetEditTabStop: Boolean;
+    function GetEditText: TCaption;
+    function GetEditTextHint: TTranslateString;
+    function GetLabelCaption: TCaption;
+    function GetLabelSpacing: Integer;
+
+    procedure SetAnchors(const AValue: TAnchors); override;
+    procedure SetEditAlignment(const AValue: TAlignment);
+    procedure SetEditAutoSize(AValue: Boolean);
+    procedure SetEditAutoSelect(AValue: Boolean);
+    procedure SetEditCharCase(AValue: TEditCharCase);
+    procedure SetEditCursor(AValue: TCursor);
+    procedure SetEditDoubleBuffered(AValue: Boolean);
+    procedure SetEditDragCursor(AValue: TCursor);
+    procedure SetEditDragMode(AValue: TDragMode);
+    procedure SetEditEchoMode(AValue: TEchoMode);
+    procedure SetEditEnabled(AValue: boolean);
+    procedure SetEditHideSelection(AValue: Boolean);
+    procedure SetEditMaxLength(AValue: Integer);
+    procedure SetEditNumbersOnly(AValue: Boolean);
+    procedure SetEditParentColor(AValue: Boolean);
+    procedure SetEditPasswordChar(AValue: Char);
+    procedure SetEditPopupMenu(AValue: TPopupmenu);
+    procedure SetEditReadOnly(AValue: Boolean);
+    procedure SetEditShowHint(AValue: Boolean);
+    procedure SetEditTag(AValue: PtrInt);
+    procedure SetEditTabStop(AValue: Boolean);
+    procedure SetEditText(const AValue: TCaption);
+    procedure SetEditTextHint(const Avalue: TTranslateString);
+    procedure SetColor(AValue: TColor); override;
+    procedure SetLabelCaption(const AValue: TCaption);
+    procedure SetLabelSpacing(AValue: Integer);
+    procedure SetName(const AValue: TComponentName); override;
+
+    procedure DoEnter; override;
+    procedure DoExit; override;
+    procedure DoOnResize; override;
     procedure Paint; override;
   public
     constructor Create(AOwner: TComponent); override;
   published
+    property Align;
+    property Alignment: TAlignment read GetEditAlignment write SetEditAlignment default taLeftJustify;
+    property AccentColor: TColor read FAccentColor write FAccentColor;
+    property Anchors;
+    property AutoSelect: Boolean read GetEditAutoSelect write SetEditAutoSelect default True;
+    property AutoSize: Boolean read GetEditAutoSize write SetEditAutoSize;
+    property BiDiMode;
+    property BorderSpacing;
+    property Caption: TCaption read GetLabelCaption write SetLabelCaption;
+    property CharCase: TEditCharCase read GetEditCharCase write SetEditCharCase default ecNormal;
     property Color;
-    property Text: string read FTexto write SetTexto;
-    property Edit: TEdit read Fedt;
-    property Title: TLabel read Flbl;
+    property Constraints;
+    property Cursor: TCursor read GetEditCursor write SetEditCursor default crDefault;
     property DisabledColor: TColor read FDisabledColor write FDisabledColor;
-    property AccentColor: TColor read FAccentColor write FAccentColor;
-    property OnChange: TNotifyEvent read FOnChange write FOnChange;
+    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 Edit: TEdit read FEdit;
+    property EditLabel: TBoundLabel read FLabel;
+    property Enabled: boolean read GetEditEnabled write SetEditEnabled;
+    property HideSelection: Boolean read GetEditHideSelection write SetEditHideSelection default True;
+    property LabelSpacing: Integer read GetLabelSpacing write SetLabelSpacing default 0;
+    property MaxLength: Integer read GetEditMaxLength write SetEditMaxLength default 0;
+    property NumbersOnly: Boolean read GetEditNumbersOnly write SetEditNumbersOnly default False;
+    property ParentBiDiMode;
+    property ParentColor default False;
+    property ParentFont default False;
+    property PasswordChar: Char read GetEditPasswordChar write SetEditPasswordChar default #0;
+    property PopupMenu: TPopupmenu read GetEditPopupMenu write SetEditPopupMenu;
+    property ReadOnly: Boolean read GetEditReadOnly write SetEditReadOnly default False;
+    property ShowHint: Boolean read GetEditShowHint write SetEditShowHint default False;
+    property Tag: PtrInt read GetEditTag write SetEditTag default 0;
+    property TabOrder;
+    property TabStop: boolean read GetEditTabStop write SetEditTabStop default True;
+    property Text: TCaption read GetEditText write SetEditText;
+    property TextHint: TTranslateString read GetEditTextHint write SetEditTextHint;
+    property Visible;
+
+    property OnChange: TNotifyEvent read GetOnEditChange write SetOnEditChange;
+    property OnChangeBounds;
+    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 OnEndDrag: TEndDragEvent read GetOnEditEndDrag write SetOnEditEndDrag;
+    property OnEnter: TNotifyEvent read GetOnEditEnter write SetOnEditEnter;
+    property OnExit: TNotifyEvent read GetOnEditExit write SetOnEditExit;
+    property OnKeyDown: TKeyEvent read GetOnEditKeyDown write SetOnEditKeyDown;
+    property OnKeyPress: TKeyPressEvent read GetOnEditKeyPress write SetOnEditKeyPress;
+    property OnKeyUp: TKeyEvent read GetOnEditKeyUp write SetOnEditKeyUp;
+    property OnMouseDown: TMouseEvent read GetOnEditMouseDown write SetOnEditMouseDown;
+    property OnMouseEnter: TNotifyEvent read GetOnEditMouseEnter write SetOnEditMouseEnter;
+    property OnMouseLeave: TNotifyEvent read GetOnEditMouseLeave write SetOnEditMouseLeave;
+    property OnMouseMove: TMouseMoveEvent read GetOnEditMouseMove write SetOnEditMouseMove;
+    property OnMouseUp: TMouseEvent read GetOnEditMouseUp write SetOnEditMouseUp;
+    property OnMouseWheel: TMouseWheelEvent read GetOnEditMouseWheel write SetOnEditMouseWheel;
+    property OnMouseWheelDown: TMouseWheelUpDownEvent read GetOnEditMouseWheelDown write SetOnEditMouseWheelDown;
+    property OnMouseWheelUp: TMouseWheelUpDownEvent read GetOnEditMouseWheelUp write SetOnEditMouseWheelUp;
+    property OnResize;
+    property OnStartDrag: TStartDragEvent read GetOnEditStartDrag write SetOnEditStartDrag;
+    property OnUTF8KeyPress: TUTF8KeyPressEvent read GetOnEditUTF8KeyPress write SetOnEditUTF8KeyPress;
   end;
 
 procedure Register;
@@ -45,84 +203,663 @@ implementation
 
 procedure Register;
 begin
+  {$IFDEF FPC}
+    {$I icons\bcmaterialedit_icon.lrs}
+  {$ENDIF}
   RegisterComponents('BGRA Controls', [TBCMaterialEdit]);
 end;
 
 { TBCMaterialEdit }
 
-procedure TBCMaterialEdit.EnterEdit(Sender: TObject);
+function TBCMaterialEdit.GetEditAlignment: TAlignment;
 begin
-  Ffocused := True;
-  Invalidate;
-  Flbl.Font.Color := accentColor;
+  result := FEdit.Alignment;
+end;
+
+function TBCMaterialEdit.GetEditAutoSize: Boolean;
+begin
+  result := FEdit.AutoSize;
+end;
+
+function TBCMaterialEdit.GetEditAutoSelect: Boolean;
+begin
+  result := FEdit.AutoSelect;
+end;
+
+function TBCMaterialEdit.GetLabelCaption: TCaption;
+begin
+  result := FLabel.Caption
+end;
+
+function TBCMaterialEdit.GetEditCharCase: TEditCharCase;
+begin
+  result := FEdit.CharCase;
+end;
+
+function TBCMaterialEdit.GetEditCursor: TCursor;
+begin
+  result := FEdit.Cursor;
+end;
+
+function TBCMaterialEdit.GetEditDoubleBuffered: Boolean;
+begin
+  result := FEdit.DoubleBuffered;
+end;
+
+function TBCMaterialEdit.GetEditDragCursor: TCursor;
+begin
+  result := FEdit.DragCursor;
+end;
+
+function TBCMaterialEdit.GetEditDragMode: TDragMode;
+begin
+  result := FEdit.DragMode;
+end;
+
+function TBCMaterialEdit.GetEditEchoMode: TEchoMode;
+begin
+  result := FEdit.EchoMode;
+end;
+
+function TBCMaterialEdit.GetEditEnabled: boolean;
+begin
+  result := FEdit.Enabled;
+end;
+
+function TBCMaterialEdit.GetEditHideSelection: Boolean;
+begin
+  result := FEdit.HideSelection;
+end;
+
+function TBCMaterialEdit.GetEditMaxLength: Integer;
+begin
+  result := FEdit.MaxLength;
+end;
+
+function TBCMaterialEdit.GetEditNumbersOnly: Boolean;
+begin
+  result := FEdit.NumbersOnly;
+end;
+
+function TBCMaterialEdit.GetEditPasswordChar: Char;
+begin
+  result := FEdit.PasswordChar;
+end;
+
+function TBCMaterialEdit.GetEditParentColor: Boolean;
+begin
+  Result := Self.ParentColor;
+end;
+
+function TBCMaterialEdit.GetEditPopupMenu: TPopupMenu;
+begin
+  if (csDestroying in ComponentState) then Exit(nil);
+
+  result := FEdit.PopupMenu;
+end;
+
+function TBCMaterialEdit.GetEditReadOnly: Boolean;
+begin
+  result := FEdit.ReadOnly;
+end;
+
+function TBCMaterialEdit.GetEditShowHint: Boolean;
+begin
+  result := FEdit.ShowHint;
+end;
+
+function TBCMaterialEdit.GetEditTag: PtrInt;
+begin
+  result := FEdit.Tag;
+end;
+
+function TBCMaterialEdit.GetEditTabStop: Boolean;
+begin
+  result := FEdit.TabStop;
+end;
+
+function TBCMaterialEdit.GetEditText: TCaption;
+begin
+  result := FEdit.Text;
+end;
+
+function TBCMaterialEdit.GetEditTextHint: TCaption;
+begin
+  result := FEdit.TextHint;
+end;
+
+function TBCMaterialEdit.GetLabelSpacing: Integer;
+begin
+  result := FLabel.BorderSpacing.Bottom;
+end;
+
+function TBCMaterialEdit.GetOnEditChange: TNotifyEvent;
+begin
+  result := FEdit.OnChange;
 end;
 
-procedure TBCMaterialEdit.ChangeEdit(Sender: TObject);
+function TBCMaterialEdit.GetOnEditClick: TNotifyEvent;
 begin
-  if Assigned(FOnChange) then
-    FOnChange(Self);
+  result := FEdit.OnClick;
 end;
 
-procedure TBCMaterialEdit.ExitEdit(Sender: TObject);
+function TBCMaterialEdit.GetOnEditContextPopup: TContextPopupEvent;
 begin
-  Ffocused := False;
+  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.GetOnEditEditingDone: TNotifyEvent;
+begin
+  result := FEdit.OnEditingDone;
+end;
+
+function TBCMaterialEdit.GetOnEditEndDrag: TEndDragEvent;
+begin
+  result := FEdit.OnEndDrag;
+end;
+
+function TBCMaterialEdit.GetOnEditEnter: TNotifyEvent;
+begin
+  result := FEdit.OnEnter;
+end;
+
+function TBCMaterialEdit.GetOnEditExit: TNotifyEvent;
+begin
+  result := FEdit.OnExit;
+end;
+
+function TBCMaterialEdit.GetOnEditKeyDown: TKeyEvent;
+begin
+  result := FEdit.OnKeyDown;
+end;
+
+function TBCMaterialEdit.GetOnEditKeyPress: TKeyPressEvent;
+begin
+  result := FEdit.OnKeyPress;
+end;
+
+function TBCMaterialEdit.GetOnEditKeyUp: TKeyEvent;
+begin
+  result := FEdit.OnKeyUp;
+end;
+
+function TBCMaterialEdit.GetOnEditMouseDown: TMouseEvent;
+begin
+  result := FEdit.OnMouseDown;
+end;
+
+function TBCMaterialEdit.GetOnEditMouseEnter: TNotifyEvent;
+begin
+  result := FEdit.OnMouseEnter;
+end;
+
+function TBCMaterialEdit.GetOnEditMouseLeave: TNotifyEvent;
+begin
+  result := FEdit.OnMouseLeave;
+end;
+
+function TBCMaterialEdit.GetOnEditMouseMove: TMouseMoveEvent;
+begin
+  result := FEdit.OnMouseMove;
+end;
+
+function TBCMaterialEdit.GetOnEditMouseUp: TMouseEvent;
+begin
+  result := FEdit.OnMouseUp;
+end;
+
+function TBCMaterialEdit.GetOnEditMouseWheel: TMouseWheelEvent;
+begin
+  result := FEdit.OnMouseWheel;
+end;
+
+function TBCMaterialEdit.GetOnEditMouseWheelDown: TMouseWheelUpDownEvent;
+begin
+  result := FEdit.OnMouseWheelDown;
+end;
+
+function TBCMaterialEdit.GetOnEditMouseWheelUp: TMouseWheelUpDownEvent;
+begin
+  result := FEdit.OnMouseWheelUp;
+end;
+
+function TBCMaterialEdit.GetOnEditStartDrag: TStartDragEvent;
+begin
+  result := FEdit.OnStartDrag;
+end;
+
+function TBCMaterialEdit.GetOnEditUTF8KeyPress: TUTF8KeyPressEvent;
+begin
+  result := FEdit.OnUTF8KeyPress;
+end;
+
+procedure TBCMaterialEdit.SetOnEditChange(AValue: TNotifyEvent);
+begin
+  FEdit.OnChange := AValue;
+end;
+
+procedure TBCMaterialEdit.SetOnEditClick(AValue: TNotifyEvent);
+begin
+  FEdit.OnClick := 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.SetOnEditEditingDone(AValue: TNotifyEvent);
+begin
+  FEdit.OnEditingDone := AValue;
+end;
+
+procedure TBCMaterialEdit.SetOnEditEndDrag(AValue: TEndDragEvent);
+begin
+  FEdit.OnEndDrag := AValue;
+end;
+
+procedure TBCMaterialEdit.SetOnEditEnter(AValue: TNotifyEvent);
+begin
+  FEdit.OnEnter := AValue;
+end;
+
+procedure TBCMaterialEdit.SetOnEditExit(AValue: TNotifyEvent);
+begin
+  FEdit.OnExit := AValue;
+end;
+
+procedure TBCMaterialEdit.SetOnEditKeyDown(AValue: TKeyEvent);
+begin
+  FEdit.OnKeyDown := AValue;
+end;
+
+procedure TBCMaterialEdit.SetOnEditKeyPress(AValue: TKeyPressEvent);
+begin
+  FEdit.OnKeyPress := AValue;
+end;
+
+procedure TBCMaterialEdit.SetOnEditKeyUp(AValue: TKeyEvent);
+begin
+  FEdit.OnKeyUp := AValue;
+end;
+
+procedure TBCMaterialEdit.SetOnEditMouseDown(AValue: TMouseEvent);
+begin
+  FEdit.OnMouseDown := AValue;
+end;
+
+procedure TBCMaterialEdit.SetOnEditMouseEnter(AValue: TNotifyEvent);
+begin
+  FEdit.OnMouseEnter := AValue;
+end;
+
+procedure TBCMaterialEdit.SetOnEditMouseLeave(AValue: TNotifyEvent);
+begin
+  FEdit.OnMouseLeave := AValue;
+end;
+
+procedure TBCMaterialEdit.SetOnEditMouseMove(AValue: TMouseMoveEvent);
+begin
+  FEdit.OnMouseMove := AValue;
+end;
+
+procedure TBCMaterialEdit.SetOnEditMouseUp(AValue: TMouseEvent);
+begin
+  FEdit.OnMouseUp := AValue;
+end;
+
+procedure TBCMaterialEdit.SetOnEditMouseWheel(AValue: TMouseWheelEvent);
+begin
+  FEdit.OnMouseWheel := AValue;
+end;
+
+procedure TBCMaterialEdit.SetOnEditMouseWheelDown(AValue: TMouseWheelUpDownEvent);
+begin
+  FEdit.OnMouseWheelDown := AValue;
+end;
+
+procedure TBCMaterialEdit.SetOnEditMouseWheelUp(AValue: TMouseWheelUpDownEvent);
+begin
+  FEdit.OnMouseWheelUp := AValue;
+end;
+
+procedure TBCMaterialEdit.SetOnEditStartDrag(AValue: TStartDragEvent);
+begin
+  FEdit.OnStartDrag := AValue;
+end;
+
+procedure TBCMaterialEdit.SetOnEditUTF8KeyPress(AValue: TUTF8KeyPressEvent);
+begin
+  FEdit.OnUTF8KeyPress := AValue;
+end;
+
+function TBCMaterialEdit.IsNeededAdjustHeight: boolean;
+begin
+  if (Self.Align in [alLeft, alRight, alClient]) then Exit(False);
+  if (akTop in Self.Anchors) and (akBottom in Self.Anchors) then Exit(False);
+  result := FEdit.AutoSize;
+end;
+
+procedure TBCMaterialEdit.SetAnchors(const AValue: TAnchors);
+begin
+  if Self.Anchors <> AValue then
+  begin
+    inherited SetAnchors(AValue);
+    Self.DoOnResize;
+  end;
+end;
+
+procedure TBCMaterialEdit.SetEditAlignment(const AValue: TAlignment);
+begin
+  FEdit.Alignment := AValue;
+end;
+
+procedure TBCMaterialEdit.SetEditAutoSize(AValue: Boolean);
+begin
+  if FEdit.AutoSize <> AValue then
+  begin
+    FEdit.AutoSize := AValue;
+    Self.DoOnResize;
+  end;
+end;
+
+procedure TBCMaterialEdit.SetEditAutoSelect(AValue: Boolean);
+begin
+  FEdit.AutoSelect := AValue;
+end;
+
+procedure TBCMaterialEdit.SetEditCharCase(AValue: TEditCharCase);
+begin
+  FEdit.CharCase := AValue;
+end;
+
+procedure TBCMaterialEdit.SetEditCursor(AValue: TCursor);
+begin
+  FEdit.Cursor := AValue;
+end;
+
+procedure TBCMaterialEdit.SetEditDoubleBuffered(AValue: Boolean);
+begin
+  FEdit.DoubleBuffered := AValue;
+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);
+begin
+  FEdit.EchoMode := AValue;
+end;
+
+procedure TBCMaterialEdit.SetEditEnabled(AValue: boolean);
+begin
+  FLabel.Enabled := AValue;
+  FEdit.Enabled := AValue;
+  if FEdit.Enabled then
+    Color := Self.Color
+  else
+    Color := FDisabledColor;
+end;
+
+procedure TBCMaterialEdit.SetEditHideSelection(AValue: Boolean);
+begin
+  FEdit.HideSelection := AValue;
+end;
+
+procedure TBCMaterialEdit.SetEditMaxLength(AValue: Integer);
+begin
+  FEdit.MaxLength := AValue;
+end;
+
+procedure TBCMaterialEdit.SetEditNumbersOnly(AValue: Boolean);
+begin
+  FEdit.NumbersOnly := AValue;
+end;
+
+procedure TBCMaterialEdit.SetEditParentColor(AValue: Boolean);
+begin
+  FEdit.ParentColor  := AValue;
+  FLabel.ParentColor := AValue;
+end;
+
+procedure TBCMaterialEdit.SetEditPasswordChar(AValue: Char);
+begin
+  FEdit.PasswordChar := AValue;
+end;
+
+procedure TBCMaterialEdit.SetColor(AValue: TColor);
+begin
+  inherited SetColor(AValue);
+  if HandleAllocated and (not (csDesigning in ComponentState)) then
+  begin
+    FEdit.ParentColor := Self.ParentColor;
+    FLabel.ParentColor := Self.ParentColor;
+
+    if not Self.ParentColor then
+    begin
+      FEdit.Color := AValue;
+      FLabel.Color := AValue;
+    end;
+    Invalidate;
+  end;
+end;
+
+procedure TBCMaterialEdit.SetEditTabStop(AValue: Boolean);
+begin
+  FEdit.TabStop := AValue;
+end;
+
+procedure TBCMaterialEdit.SetEditPopupMenu(AValue: TPopupmenu);
+begin
+  FEdit.PopupMenu := AValue;
+end;
+
+procedure TBCMaterialEdit.SetEditReadOnly(AValue: Boolean);
+begin
+  FEdit.ReadOnly := AValue;
+end;
+
+procedure TBCMaterialEdit.SetEditShowHint(AValue: Boolean);
+begin
+  FEdit.ShowHint := AValue;
+end;
+
+procedure TBCMaterialEdit.SetEditTag(AValue: PtrInt);
+begin
+  FEdit.Tag := AValue;
+end;
+
+procedure TBCMaterialEdit.SetEditTextHint(const Avalue: TTranslateString);
+begin
+  FEdit.TextHint := AValue;
+end;
+
+procedure TBCMaterialEdit.SetEditText(const AValue: TCaption);
+begin
+  FEdit.Text := AValue;
+end;
+
+procedure TBCMaterialEdit.SetLabelCaption(const AValue: TCaption);
+begin
+  FLabel.Caption := AValue;
+end;
+
+procedure TBCMaterialEdit.SetLabelSpacing(AValue: Integer);
+begin
+  if FLabel.BorderSpacing.Bottom <> AValue then
+  begin
+    FLabel.BorderSpacing.Bottom := AValue;
+    Self.DoOnResize;
+  end;
+end;
+
+procedure TBCMaterialEdit.SetName(const AValue: TComponentName);
+begin
+  if (csDesigning in ComponentState) then
+  begin
+    if (FLabel.Caption = '') or (AnsiSameText(FLabel.Caption, AValue)) then
+      FLabel.Caption := 'Label';
+
+    if (FLabel.Name = '') or (AnsiSameText(FLabel.Name, AValue)) then
+      FLabel.Name := AValue + 'SubLabel';
+
+    if (FEdit.Text = '') or (AnsiSameText(FEdit.Text, AValue)) then
+      FEdit.Text := AValue;
+
+    if (FEdit.Name = '') or (AnsiSameText(FEdit.Name, AValue)) then
+      FEdit.Name := AValue + 'SubEdit';
+  end;
+  inherited SetName(AValue);
+end;
+
+procedure TBCMaterialEdit.DoEnter;
+begin
+  inherited DoEnter;
+  FFocused := True;
+  Invalidate;
+  FLabel.Font.Color := AccentColor;
+end;
+
+procedure TBCMaterialEdit.DoExit;
+begin
+  FFocused := False;
   Invalidate;
-  Flbl.Font.Color := DisabledColor;
+  FLabel.Font.Color := DisabledColor;
 end;
 
-procedure TBCMaterialEdit.SetTexto(AValue: string);
+procedure TBCMaterialEdit.DoOnResize;
+var
+  AutoSizedHeight: longint;
 begin
-  if FTexto = AValue then
-    Exit;
-  FTexto := AValue;
-  Flbl.Caption := FTexto;
-  //Fedt.TextHint := FTexto;
+  if IsNeededAdjustHeight then
+  begin
+    FEdit.Align := alBottom;
+    AutoSizedHeight :=
+      FLabel.Height +
+      FLabel.BorderSpacing.Around +
+      FLabel.BorderSpacing.Bottom +
+      FLabel.BorderSpacing.Top +
+      FEdit.Height +
+      FEdit.BorderSpacing.Around +
+      FEdit.BorderSpacing.Bottom +
+      FEdit.BorderSpacing.Top;
+
+    if Self.Height <> AutoSizedHeight then
+      Self.Height := AutoSizedHeight;
+  end else
+  begin
+    FEdit.Align := alClient;
+  end;
+  inherited DoOnResize;
 end;
 
 procedure TBCMaterialEdit.Paint;
+var
+  LeftPos, RightPos: integer;
 begin
   inherited Paint;
   Canvas.Brush.Color := Color;
   Canvas.Pen.Color := Color;
   Canvas.Rectangle(0, 0, Width, Height);
-  if (fFocused) then
+
+  if Assigned(Parent) and (Parent.Color = Color) then
+  begin
+    LeftPos := FEdit.Left;
+    RightPos := FEdit.Left + FEdit.Width;
+  end else
+  begin
+    LeftPos := 0;
+    RightPos := Width;
+  end;
+
+  if (FFocused) and (FEdit.Enabled) then
   begin
     Canvas.Pen.Color := AccentColor;
-    Canvas.Line(0, Height - 2, Width, Height - 2);
-    Canvas.Line(0, Height - 1, Width, Height - 1);
-  end
-  else
+    Canvas.Line(LeftPos, Height - 2, RightPos, Height - 2);
+    Canvas.Line(LeftPos, Height - 1, RightPos, Height - 1);
+  end else
   begin
     Canvas.Pen.Color := DisabledColor;
-    Canvas.Line(0, Height - 1, Width, Height - 1);
+    Canvas.Line(LeftPos, Height - 1, RightPos, Height - 1);
   end;
 end;
 
 constructor TBCMaterialEdit.Create(AOwner: TComponent);
 begin
   inherited Create(AOwner);
-  Self.BevelOuter := bvNone;
-  Self.Color := clWhite;
-  AccentColor := clHighlight;
-  DisabledColor := $00B8AFA8;
-  Flbl := TLabel.Create(Self);
-  Flbl.Align := alTop;
-  Flbl.Caption := 'Buscar';
-  Flbl.BorderSpacing.Around := 4;
-  Flbl.Font.Style := [fsBold];
-  Flbl.Font.Color := $00B8AFA8;
-  Flbl.Parent := Self;
-  Fedt := TEdit.Create(Self);
-  Fedt.Color := Color;
-  Fedt.Font.Color := clBlack;
-  Fedt.OnEnter := @EnterEdit;
-  Fedt.OnExit := @ExitEdit;
-  Fedt.OnChange:=@ChangeEdit;
-  Fedt.Align := alClient;
-  Fedt.BorderStyle := bsNone;
-  //Fedt.TextHint := 'Buscar';
-  Fedt.BorderSpacing.Around := 4;
-  Fedt.Parent := Self;
+  Self.AccentColor := clHighlight;
+  Self.BorderStyle := bsNone;
+  Self.Color := clWindow;
+  Self.DisabledColor := $00B8AFA8;
+  Self.ParentColor := False;
+  FLabel := TBoundLabel.Create(Self);
+  FLabel.Align := alTop;
+  FLabel.AutoSize := True;
+  FLabel.BorderSpacing.Around := 0;
+  FLabel.BorderSpacing.Bottom := 2;
+  FLabel.BorderSpacing.Left := 4;
+  FLabel.BorderSpacing.Right := 4;
+  FLabel.BorderSpacing.Top := 4;
+  FLabel.Font.Color := $00B8AFA8;
+  FLabel.Font.Style := [fsBold];
+  FLabel.Parent := Self;
+  FLabel.ParentFont := False;
+  FLabel.ParentBiDiMode := True;
+  FLabel.SetSubComponent(True);
+  FEdit := TEdit.Create(Self);
+  FEdit.Align := alBottom;
+  FEdit.AutoSelect := True;
+  FEdit.AutoSize := True;
+  FEdit.BorderSpacing.Around := 0;
+  FEdit.BorderSpacing.Bottom := 2;
+  FEdit.BorderSpacing.Left := 4;
+  FEdit.BorderSpacing.Right := 4;
+  FEdit.BorderSpacing.Top := 0;
+  FEdit.BorderStyle := bsNone;
+  FEdit.Color := Color;
+  FEdit.Font.Color := clBlack;
+  FEdit.Parent := Self;
+  FEdit.ParentFont := True;
+  FEdit.ParentBiDiMode := True;
+  FEdit.TabStop := True;
+  FEdit.SetSubComponent(True);
 end;
 
 end.

+ 19 - 0
bcmaterialfloatspinedit.pas

@@ -24,12 +24,17 @@ type
     procedure ChangeEdit(Sender: TObject);
     procedure EnterEdit(Sender: TObject);
     procedure ExitEdit(Sender: TObject);
+    function GetTabStop: Boolean;
+    procedure SetTabStop(AValue: Boolean);
     procedure SetTexto(AValue: string);
   protected
     procedure Paint; override;
   public
     constructor Create(AOwner: TComponent); override;
   published
+    property Align;
+    property Anchors;
+    property BorderSpacing;
     property Color;
     property Text: string read FTexto write SetTexto;
     property Edit: TFloatSpinEdit read Fedt;
@@ -37,6 +42,8 @@ type
     property DisabledColor: TColor read FDisabledColor write FDisabledColor;
     property AccentColor: TColor read FAccentColor write FAccentColor;
     property OnChange: TNotifyEvent read FOnChange write FOnChange;
+    property TabOrder;
+    property TabStop: boolean read GetTabStop write SetTabStop default True;
   end;
 
 procedure Register;
@@ -70,6 +77,17 @@ begin
   Flbl.Font.Color := DisabledColor;
 end;
 
+function TBCMaterialFloatSpinEdit.GetTabStop: Boolean;
+begin
+  result := Fedt.TabStop;
+end;
+
+procedure TBCMaterialFloatSpinEdit.SetTabStop(AValue: Boolean);
+begin
+  if Fedt.TabStop = AValue then Exit;
+  Fedt.TabStop := AValue;
+end;
+
 procedure TBCMaterialFloatSpinEdit.SetTexto(AValue: string);
 begin
   if FTexto = AValue then
@@ -125,6 +143,7 @@ begin
   Fedt.Parent := Self;
   Fedt.MinValue := 0;
   Fedt.MaxValue := MaxInt;
+  Fedt.TabStop := True;
 end;
 
 end.

+ 19 - 0
bcmaterialspinedit.pas

@@ -24,12 +24,17 @@ type
     procedure ChangeEdit(Sender: TObject);
     procedure EnterEdit(Sender: TObject);
     procedure ExitEdit(Sender: TObject);
+    function GetTabStop: Boolean;
+    procedure SetTabStop(AValue: Boolean);
     procedure SetTexto(AValue: string);
   protected
     procedure Paint; override;
   public
     constructor Create(AOwner: TComponent); override;
   published
+    property Align;
+    property Anchors;
+    property BorderSpacing;
     property Color;
     property Text: string read FTexto write SetTexto;
     property Edit: TSpinEdit read Fedt;
@@ -37,6 +42,8 @@ type
     property DisabledColor: TColor read FDisabledColor write FDisabledColor;
     property AccentColor: TColor read FAccentColor write FAccentColor;
     property OnChange: TNotifyEvent read FOnChange write FOnChange;
+    property TabOrder;
+    property TabStop: boolean read GetTabStop write SetTabStop default True;
   end;
 
 procedure Register;
@@ -70,6 +77,17 @@ begin
   Flbl.Font.Color := DisabledColor;
 end;
 
+function TBCMaterialSpinEdit.GetTabStop: Boolean;
+begin
+  result := Fedt.TabStop;
+end;
+
+procedure TBCMaterialSpinEdit.SetTabStop(AValue: Boolean);
+begin
+  if Fedt.TabStop = AValue then Exit;
+  Fedt.TabStop := AValue;
+end;
+
 procedure TBCMaterialSpinEdit.SetTexto(AValue: string);
 begin
   if FTexto = AValue then
@@ -125,6 +143,7 @@ begin
   Fedt.Parent := Self;
   Fedt.MinValue := 0;
   Fedt.MaxValue := MaxInt;
+  Fedt.TabStop := True;
 end;
 
 end.

+ 35 - 0
icons/bcmaterialedit_icon.lrs

@@ -0,0 +1,35 @@
+LazarusResources.Add('tbcmaterialedit','PNG',[
+  #137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#24#0#0#0#24#8#6#0#0#0#224'w='#248#0
+  +#0#0#9'pHYs'#0#0#7'a'#0#0#7'a'#1#149#195#184#182#0#0#0#25'tEXtSoftware'#0'ww'
+  +'w.inkscape.org'#155#238'<'#26#0#0#2#210'IDATH'#137#237#149'AO'#163'U'#20#134
+  +#159#251#181#180'('#138#25'Z&0hc'#2'3'#25#134'DH:'#17'"Q!'#179'`!'#6#130#27
+  +'f'#227#194'/a'#225#138'_@'#220#186'#&'#162#172#216#184#192'HbC&'#200#194'4'
+  +#146'8'#2#9#13#8#130#163#134'&:Nb'#1'+'#233'@:-'#253#238#235#166'60'#173'N'
+  +#23#214#149#239#242#158'{'#207's'#206'='#231#222'c$QK95'#245#254'_'#0#252'@M'
+  +#239#200#1#248#244#235#2#249'B'#185#241#147#149'3'#146')['#182#254#232#12#222
+  +#255'<_'#21#192#15'pg'#163#192#27'7}'#4#252#134#165'D'#129#187#247'<n'#191'Z'
+  +'G2%'#238'=8#'#18'vx'#231'V'#29#31'-'#231#193#24#222'~'#221#207#238#253'r'
+  +#240#223#2#206#235#217#167#13#1#191#225#179'o'#206#240'9'#134'[/'#249#249'x9'
+  +#207#165'g'#12'k?Z|>'#184#241'|'#245#165'+'#237#252#242'['#143#239'~'#177#188
+  +'7'#159#227#242's'#6#175#24#224#221#239'=N'#30#193#139#151#13#193':x'#171#207
+  +#207#181'+'#213#3#140'$'#173#255#228#145'~(^'#8';H'#224#20#207#27#192#179#16
+  +#172#131'kW'#28'v'#239'[~'#251'C'#188'r'#221#199#206#207#30'/_'#245'U'#7#168
+  +':'#156''''#200#179'`-'#24#3#254'"'#187#172#6#137'D'#130#173#173'-\'#215#5
+  +#224#244#244#148'X,F*'#149#162#191#191#159#222#222'^$'#17#143#199#217#222#222
+  +'&'#24#12'266FKK'#11#203#155#5#190#218#245'x'#237#134#143'7o'#22']'#235#156
+  +'fgg'#21#8#4#20#12#6'%I'#158#231#169#187#187'[MMM'#234#234#234#146#227'8Z\\'
+  +#212#234#234#170#26#26#26'400'#160'P('#164#214#214'Ve'#179'Y'#253#240#192#211
+  +#135'_'#228#245#235#239#182#228#179#4#136#199#227#10#133'B'#26#30#30'.'#1'$i'
+  +'ssS'#153'LF'#214'Z'#133#195'aMNNJ'#146'2'#153#140'$innN'#198#24#29#29#29#253
+  +'3@'#146#14#14#14'455u'#1#240#151#214#215#215#229'8'#142'b'#177#152'$immM'
+  +#174#235#170#179#179'S'#211#211#211#146'T'#17'p'#161#223#154#155#155'+'#22'o'
+  +#127#127#159#209#209'Q\'#215'edd'#4#128'\.'#135#181#150'|>'#207#252#252'<'
+  +#199#199#199#149'+'#255'x'#164#143'g'#144'L&'#21#137'D411!'#207#243#202'2[YY'
+  +#17#160#133#133#133#138#25#148'u'#209'ye'#179'Y'#6#7#7'9<<$'#157'N3>>N$'#18
+  +#161#163#163#131#141#141#13#218#218#218'XZZ'#162#190#190#158#158#158#30#188
+  +#10'>'#202#0#209'h'#180#212#162#214'Z'#134#134#134'.'#216#27#27#27#233#235
+  +#235'cgg'#135#189#189'='#162#209'(333'#180#183#183#147#216#247'8'#201#138#244
+  +'C'#209#214'd'#224#223'~h'#201#148#229#248'T<'#21'0t'#22#255'+'#243#193#157
+  +'\M'#231#129#185#250#238'Im'#1#255#15#253''''#233'O'#229'5'#245#230#233#208
+  +#138')'#0#0#0#0'IEND'#174'B`'#130
+]);

BIN
icons/tbcmaterialedit.png


+ 9 - 6
images/bgracontrols_images_list.txt

@@ -7,6 +7,9 @@ tbcbutton_200.png
 tbclabel.png
 tbclabel_150.png
 tbclabel_200.png
+tbcmaterialedit.png
+tbcmaterialedit_150.png
+tbcmaterialedit_200.png
 tbcmaterialdesignbutton.png
 tbcmaterialdesignbutton_150.png
 tbcmaterialdesignbutton_200.png
@@ -104,12 +107,12 @@ tbccombobox_200.png
 tbgrathemecheckbox.png
 tbgrathemecheckbox_150.png
 tbgrathemecheckbox_200.png
-tbcfluentprogressring.png
-tbcfluentprogressring_150.png
-tbcfluentprogressring_200.png
-tbcfluentslider.png
-tbcfluentslider_150.png
-tbcfluentslider_200.png
+TBCFluentProgressRing.png
+TBCFluentProgressRing_150.png
+TBCFluentProgressRing_200.png
+TBCFluentSlider.png
+TBCFluentSlider_150.png
+TBCFluentSlider_200.png
 TBCLeaLCDDisplay.png
 TBCLeaLCDDisplay_150.png
 TBCLeaLCDDisplay_200.png

+ 126 - 0
images/svg/tbcmaterialedit.svg

@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   width="48"
+   height="48"
+   viewBox="0 0 48 48"
+   version="1.1"
+   id="svg1"
+   sodipodi:docname="tbcmaterialedit.svg"
+   inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
+   inkscape:export-filename="materialedit.png"
+   inkscape:export-xdpi="5.7600002"
+   inkscape:export-ydpi="5.7600002"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:svg="http://www.w3.org/2000/svg">
+  <sodipodi:namedview
+     id="namedview1"
+     pagecolor="#505050"
+     bordercolor="#ffffff"
+     borderopacity="1"
+     inkscape:showpageshadow="0"
+     inkscape:pageopacity="0"
+     inkscape:pagecheckerboard="1"
+     inkscape:deskcolor="#505050"
+     inkscape:document-units="px"
+     inkscape:zoom="11.947158"
+     inkscape:cx="17.912209"
+     inkscape:cy="34.15038"
+     inkscape:window-width="2560"
+     inkscape:window-height="1371"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1"
+     inkscape:current-layer="layer1" />
+  <defs
+     id="defs1">
+    <rect
+       x="78.565514"
+       y="167.72414"
+       width="343.3931"
+       height="166.84138"
+       id="rect2" />
+  </defs>
+  <g
+     inkscape:label="Livello 1"
+     inkscape:groupmode="layer"
+     id="layer1">
+    <text
+       xml:space="preserve"
+       id="text1"
+       style="font-size:192px;text-align:start;writing-mode:lr-tb;direction:ltr;white-space:pre;shape-inside:url(#rect2);display:inline;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:5;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"><tspan
+         x="78.566406"
+         y="509.26244"
+         id="tspan5"><tspan
+           dx="0 15.253366 15.253366"
+           style="font-size:26.6667px"
+           id="tspan1">123</tspan></tspan></text>
+    <g
+       id="g2">
+      <rect
+         style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:3.24645;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:12.9858, 3.24645;stroke-dashoffset:3.24645;stroke-opacity:1;paint-order:markers fill stroke"
+         id="rect4"
+         width="47.989674"
+         height="36"
+         x="0"
+         y="6" />
+      <rect
+         style="fill:#256af4;fill-opacity:1;stroke:#256af4;stroke-width:0;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0.880555;stroke-opacity:1;paint-order:markers fill stroke"
+         id="rect1"
+         width="48"
+         height="3"
+         x="0"
+         y="39" />
+      <text
+         xml:space="preserve"
+         style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:10.6667px;font-family:'Noto Sans';-inkscape-font-specification:'Noto Sans Bold';text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#256af4;fill-opacity:1;stroke:none;stroke-width:1.8;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:7.2, 1.8;stroke-dashoffset:1.8;stroke-opacity:1;paint-order:markers fill stroke"
+         x="1.539997"
+         y="16.606693"
+         id="text4"><tspan
+           sodipodi:role="line"
+           id="tspan4"
+           x="1.539997"
+           y="16.606693"
+           style="font-size:10.6667px;stroke-width:1.8">Label</tspan></text>
+      <text
+         xml:space="preserve"
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:19.6246px;font-family:'Noto Sans';-inkscape-font-specification:'Noto Sans';text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:3.94244;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:15.7698, 3.94244;stroke-dashoffset:3.94244;stroke-opacity:1;paint-order:markers fill stroke"
+         x="3.8421485"
+         y="35.20821"
+         id="text3"><tspan
+           sodipodi:role="line"
+           id="tspan3"
+           x="3.8421485"
+           y="35.20821"
+           style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:'Noto Sans';-inkscape-font-specification:'Noto Sans Bold';fill:#000000;fill-opacity:1;stroke:none;stroke-width:3.94244;stroke-opacity:1">123</tspan></text>
+      <g
+         id="g1"
+         transform="translate(0,5.9999994)">
+        <rect
+           style="fill:#256af4;fill-opacity:1;stroke:none;stroke-width:2.95821;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:11.8312, 2.95821;stroke-dashoffset:2.95821;stroke-opacity:1;paint-order:markers fill stroke"
+           id="rect5"
+           width="5.0587049"
+           height="16.5"
+           x="38.611244"
+           y="13.952229" />
+        <rect
+           style="fill:#ffffff;fill-opacity:1;stroke-width:1.26912;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:5.07641, 1.26912;stroke-dashoffset:1.26912;paint-order:markers fill stroke"
+           id="rect3"
+           width="2.2"
+           height="15.121"
+           x="38.5"
+           y="14.641728" />
+        <rect
+           style="fill:#ffffff;fill-opacity:1;stroke-width:1.26905;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:5.0764, 1.26905;stroke-dashoffset:1.26905;paint-order:markers fill stroke"
+           id="rect3-5"
+           width="2.2"
+           height="15.121"
+           x="41.505615"
+           y="14.641728" />
+      </g>
+    </g>
+  </g>
+</svg>

BIN
images/tbcmaterialedit.png


BIN
images/tbcmaterialedit_150.png


BIN
images/tbcmaterialedit_200.png