Why don't you use the TEdit's tag field? It is intended to store arbitrary values.
That only gives you one integer (Ptrint) to use.
The whole idea of reusing properties for unintended purposes is misguided. Using Tag is safe (it's provided for user customisation and is never touched by LCL code), but you can never be sure that touching other properties might not have unintended side-effects (unless you wrote the component yourself, and know intimate details of how it works).
It is straightforward to customise existing LCL components. Add the properties you need with apprpriate setter and getter methods and storage fields.
Then instantiate them 'by hand', giving an owner component (to handle later destruction), and set Parent and possibly Top and Left and any other defaults your component needs when initialized.
When you are satisfied that your customised component is debugged, add a RegisterComponent() call to stick it on the IDE Component Palette and save you having to do the setup code 'by hand' (look at any component's source to see how to do this). Here is a simple example:
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Forms, StdCtrls;
type
TEdX = class(TEdit)
private
FNewIntProp: integer;
FNewStrProp: string;
procedure SetNewIntProp(AValue: integer);
procedure SetNewStrProp(AValue: string);
public
constructor Create(theComponent: TComponent); override;
property NewIntProp: integer read FNewIntProp write SetNewIntProp;
property NewStrProp: string read FNewStrProp write SetNewStrProp;
end;
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
edX: TEdX;
public
end;
var
Form1: TForm1;
implementation
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
begin
edX:= TEdX.Create(Self);
edX.Parent:= Self;
edX.Caption:= IntToStr(edX.NewIntProp);
Caption:= edX.NewStrProp;
end;
{$R *.lfm}
{ TEdX }
procedure TEdX.SetNewIntProp(AValue: integer);
begin
if FNewIntProp=AValue then Exit;
FNewIntProp:=AValue;
// add custom code here
end;
procedure TEdX.SetNewStrProp(AValue: string);
begin
if FNewStrProp=AValue then Exit;
FNewStrProp:=AValue;
// add custom code here
end;
constructor TEdX.Create(theComponent: TComponent);
begin
inherited Create(theComponent);
FNewStrProp:= 'new string property value';
FNewIntProp:= 99;
end;
end.