mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-21 11:39:55 +02:00
ShellTreeView: make PopulateWithBaseFiles public. Makes it possible to populate a ShelltreeView that was created at runtime.
git-svn-id: trunk@51639 -
This commit is contained in:
parent
cbd2968005
commit
47106ebc21
@ -70,7 +70,6 @@ type
|
|||||||
{ Other methods specific to Lazarus }
|
{ Other methods specific to Lazarus }
|
||||||
function PopulateTreeNodeWithFiles(
|
function PopulateTreeNodeWithFiles(
|
||||||
ANode: TTreeNode; ANodePath: string): Boolean;
|
ANode: TTreeNode; ANodePath: string): Boolean;
|
||||||
procedure PopulateWithBaseFiles;
|
|
||||||
procedure DoSelectionChanged; override;
|
procedure DoSelectionChanged; override;
|
||||||
function CanExpand(Node: TTreeNode): Boolean; override;
|
function CanExpand(Node: TTreeNode): Boolean; override;
|
||||||
public
|
public
|
||||||
@ -85,6 +84,7 @@ type
|
|||||||
AMask: string; AObjectTypes: TObjectTypes; AResult: TStrings; AFileSortType: TFileSortType = fstNone);
|
AMask: string; AObjectTypes: TObjectTypes; AResult: TStrings; AFileSortType: TFileSortType = fstNone);
|
||||||
{ Other methods specific to Lazarus }
|
{ Other methods specific to Lazarus }
|
||||||
function GetPathFromNode(ANode: TTreeNode): string;
|
function GetPathFromNode(ANode: TTreeNode): string;
|
||||||
|
procedure PopulateWithBaseFiles;
|
||||||
procedure Refresh(ANode: TTreeNode); overload;
|
procedure Refresh(ANode: TTreeNode); overload;
|
||||||
|
|
||||||
{ Properties }
|
{ Properties }
|
||||||
@ -858,7 +858,7 @@ var
|
|||||||
begin
|
begin
|
||||||
// avoids crashes in the IDE by not populating during design
|
// avoids crashes in the IDE by not populating during design
|
||||||
if (csDesigning in ComponentState) then Exit;
|
if (csDesigning in ComponentState) then Exit;
|
||||||
|
Items.Clear;
|
||||||
r := GetLogicalDriveStrings(SizeOf(Drives), Drives);
|
r := GetLogicalDriveStrings(SizeOf(Drives), Drives);
|
||||||
if r = 0 then Exit;
|
if r = 0 then Exit;
|
||||||
if r > SizeOf(Drives) then Exit;
|
if r > SizeOf(Drives) then Exit;
|
||||||
@ -883,6 +883,7 @@ begin
|
|||||||
// avoids crashes in the IDE by not populating during design
|
// avoids crashes in the IDE by not populating during design
|
||||||
// also do not populate before loading is done
|
// also do not populate before loading is done
|
||||||
if ([csDesigning, csLoading] * ComponentState <> []) then Exit;
|
if ([csDesigning, csLoading] * ComponentState <> []) then Exit;
|
||||||
|
Items.Clear;
|
||||||
|
|
||||||
// This allows showing "/" in Linux, but in Windows it makes no sense to show the base
|
// This allows showing "/" in Linux, but in Windows it makes no sense to show the base
|
||||||
if GetBasePath() <> '' then
|
if GetBasePath() <> '' then
|
||||||
|
Loading…
Reference in New Issue
Block a user