mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 09:09:17 +02:00
implemented auto selection visible for component tree
git-svn-id: trunk@4766 -
This commit is contained in:
parent
ab28387ed2
commit
8307c1426c
@ -2392,6 +2392,7 @@ begin
|
|||||||
PropertyGrid.Selections:=FComponentList;
|
PropertyGrid.Selections:=FComponentList;
|
||||||
EventGrid.Selections:=FComponentList;
|
EventGrid.Selections:=FComponentList;
|
||||||
ComponentTree.Selections:=FComponentList;
|
ComponentTree.Selections:=FComponentList;
|
||||||
|
ComponentTree.MakeSelectionVisible;
|
||||||
if (not Visible) and (FComponentList.Count>0) then
|
if (not Visible) and (FComponentList.Count>0) then
|
||||||
Visible:=true;
|
Visible:=true;
|
||||||
end;
|
end;
|
||||||
|
@ -1731,6 +1731,8 @@ type
|
|||||||
procedure LockSelectionChangeEvent;
|
procedure LockSelectionChangeEvent;
|
||||||
procedure UnlockSelectionChangeEvent;
|
procedure UnlockSelectionChangeEvent;
|
||||||
function GetFirstMultiSelected: TTreeNode;
|
function GetFirstMultiSelected: TTreeNode;
|
||||||
|
function SelectionVisible: boolean;
|
||||||
|
procedure MakeSelectionVisible;
|
||||||
public
|
public
|
||||||
property BackgroundColor: TColor
|
property BackgroundColor: TColor
|
||||||
read FBackgroundColor write SetBackgroundColor;
|
read FBackgroundColor write SetBackgroundColor;
|
||||||
@ -1935,6 +1937,9 @@ end.
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.91 2003/11/07 15:57:45 mattias
|
||||||
|
implemented auto selection visible for component tree
|
||||||
|
|
||||||
Revision 1.90 2003/10/22 17:50:16 mattias
|
Revision 1.90 2003/10/22 17:50:16 mattias
|
||||||
updated rpm scripts
|
updated rpm scripts
|
||||||
|
|
||||||
|
@ -5093,6 +5093,34 @@ begin
|
|||||||
Result:=Items.FFirstMultiSelected;
|
Result:=Items.FFirstMultiSelected;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TCustomTreeView.SelectionVisible: boolean;
|
||||||
|
var
|
||||||
|
ANode: TTreeNode;
|
||||||
|
begin
|
||||||
|
ANode:=GetFirstMultiSelected;
|
||||||
|
while (ANode<>nil) do begin
|
||||||
|
if ANode.IsVisible then begin
|
||||||
|
Result:=true;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
ANode:=ANode.GetNextMultiSelected;
|
||||||
|
end;
|
||||||
|
ANode:=Selected;
|
||||||
|
Result:=(ANode<>nil) and (ANode.IsVisible);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TCustomTreeView.MakeSelectionVisible;
|
||||||
|
var
|
||||||
|
ANode: TTreeNode;
|
||||||
|
begin
|
||||||
|
if SelectionVisible then exit;
|
||||||
|
ANode:=GetFirstMultiSelected;
|
||||||
|
if (ANode=nil) then
|
||||||
|
ANode:=Selected;
|
||||||
|
if ANode=nil then exit;
|
||||||
|
ANode.MakeVisible;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCustomTreeView.SetSeparatorColor(const AValue: TColor);
|
procedure TCustomTreeView.SetSeparatorColor(const AValue: TColor);
|
||||||
begin
|
begin
|
||||||
if fSeparatorColor=AValue then exit;
|
if fSeparatorColor=AValue then exit;
|
||||||
|
Loading…
Reference in New Issue
Block a user