MG: fixed rubberband

git-svn-id: trunk@1414 -
This commit is contained in:
lazarus 2002-02-09 02:30:38 +00:00
parent 11ed6eeaa1
commit 9fee6d8ff2

View File

@ -678,11 +678,16 @@ type
UNDER CONSTRUCTION by Mattias} UNDER CONSTRUCTION by Mattias}
TListPropertyEditor = class; TListPropertyEditor = class;
TListElementPropertyEditor = class(TPropertyEditor) TListElementPropertyEditor = class(TNestedPropertyEditor)
protected private
FIndex: integer;
FList: TListPropertyEditor;
public public
constructor Create(Parent: TListPropertyEditor; AnIndex: integer);
destructor Destroy; override;
function GetAttributes: TPropertyAttributes; override;
property List: TListPropertyEditor read FList;
property TheIndex: integer read FIndex;
end; end;
{ TListPropertyEditor { TListPropertyEditor
@ -708,6 +713,7 @@ type
function CreateElementPropEditor(Index: integer): TListElementPropertyEditor; virtual; function CreateElementPropEditor(Index: integer): TListElementPropertyEditor; virtual;
procedure DoSaveElements; virtual; procedure DoSaveElements; virtual;
procedure FreeElementPropertyEditors; virtual; procedure FreeElementPropertyEditors; virtual;
function GetElementAttributes(AnIndex: integer): TPropertyAttributes; virtual;
public public
constructor Create(Hook:TPropertyEditorHook; constructor Create(Hook:TPropertyEditorHook;
ComponentList: TComponentSelectionList; APropCount:Integer); override; ComponentList: TComponentSelectionList; APropCount:Integer); override;
@ -2198,6 +2204,26 @@ begin
Result := Result + ']'; Result := Result + ']';
end; end;
{ TListElementPropertyEditor }
constructor TListElementPropertyEditor.Create(Parent: TListPropertyEditor;
AnIndex: integer);
begin
inherited Create(Parent);
FList:=Parent;
FIndex:=AnIndex;
end;
destructor TListElementPropertyEditor.Destroy;
begin
inherited Destroy;
end;
function TListElementPropertyEditor.GetAttributes: TPropertyAttributes;
begin
Result:=List.GetElementAttributes(TheIndex);
end;
{ TListPropertyEditor } { TListPropertyEditor }
function TListPropertyEditor.GetElementCount: integer; function TListPropertyEditor.GetElementCount: integer;
@ -2277,8 +2303,7 @@ end;
function TListPropertyEditor.CreateElementPropEditor(Index: integer function TListPropertyEditor.CreateElementPropEditor(Index: integer
): TListElementPropertyEditor; ): TListElementPropertyEditor;
begin begin
// ToDo Result:=TListElementPropertyEditor.Create(Self,Index);
Result:=nil;// Result:=TListElementPropertyEditor.Create;
end; end;
procedure TListPropertyEditor.BeginSaveElement; procedure TListPropertyEditor.BeginSaveElement;
@ -2316,6 +2341,12 @@ begin
SavedPropertyEditors.Clear; SavedPropertyEditors.Clear;
end; end;
function TListPropertyEditor.GetElementAttributes(AnIndex: integer
): TPropertyAttributes;
begin
Result:= [paReadOnly];
end;
function TListPropertyEditor.IsSaving: boolean; function TListPropertyEditor.IsSaving: boolean;
begin begin
Result:=SaveElementLock>0; Result:=SaveElementLock>0;