mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-19 02:29:26 +02:00
MG: fixed scrollbars of TTreeView
git-svn-id: trunk@1410 -
This commit is contained in:
parent
88e11d7a41
commit
710394eb12
@ -450,7 +450,20 @@ type
|
||||
public
|
||||
function GetAttributes: TPropertyAttributes; override;
|
||||
procedure GetProperties(Proc: TGetPropEditProc); override;
|
||||
function GetValue: ansistring; override;
|
||||
function GetValue: AnsiString; override;
|
||||
end;
|
||||
|
||||
{ TCustomListPropertyEditor
|
||||
}
|
||||
TCustomListPropertyEditor = class(TPropertyEditor)
|
||||
protected
|
||||
function GetListName: AnsiString; virtual;
|
||||
function GetElementCount: integer; virtual;
|
||||
function GetElement(Index: integer): TPropertyEditor; virtual;
|
||||
public
|
||||
function GetAttributes: TPropertyAttributes; override;
|
||||
procedure GetProperties(Proc: TGetPropEditProc); override;
|
||||
function GetValue: AnsiString; override;
|
||||
end;
|
||||
|
||||
{ TClassPropertyEditor
|
||||
@ -2043,6 +2056,48 @@ begin
|
||||
Result := Result + ']';
|
||||
end;
|
||||
|
||||
{ TCustomListPropertyEditor }
|
||||
|
||||
function TCustomListPropertyEditor.GetListName: AnsiString;
|
||||
begin
|
||||
Result:='';
|
||||
end;
|
||||
|
||||
function TCustomListPropertyEditor.GetElementCount: integer;
|
||||
begin
|
||||
Result:=0;
|
||||
end;
|
||||
|
||||
function TCustomListPropertyEditor.GetElement(Index: integer): TPropertyEditor;
|
||||
begin
|
||||
Result:=nil;
|
||||
end;
|
||||
|
||||
function TCustomListPropertyEditor.GetAttributes: TPropertyAttributes;
|
||||
begin
|
||||
Result:= [paSubProperties, paReadOnly];
|
||||
end;
|
||||
|
||||
procedure TCustomListPropertyEditor.GetProperties(Proc: TGetPropEditProc);
|
||||
var
|
||||
i, ElementCount: integer;
|
||||
begin
|
||||
ElementCount:=GetElementCount;
|
||||
for i:=0 to ElementCount-1 do
|
||||
Proc(GetElement(i));
|
||||
end;
|
||||
|
||||
function TCustomListPropertyEditor.GetValue: AnsiString;
|
||||
var
|
||||
ElementCount: integer;
|
||||
begin
|
||||
ElementCount:=GetElementCount;
|
||||
if ElementCount<>1 then
|
||||
Result:=IntToStr(GetElementCount)+' items'
|
||||
else
|
||||
Result:='1 item';
|
||||
end;
|
||||
|
||||
{ TClassPropertyEditor }
|
||||
|
||||
function TClassPropertyEditor.GetAttributes: TPropertyAttributes;
|
||||
|
Loading…
Reference in New Issue
Block a user