Components for Delphi and C++ Builder.

Go to Russian forum
Go to EhLib.com
It is currently 28 Mar 2024, 20:42

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: 05 Apr 2021, 10:40 
Offline

Joined: 15 Mar 2021, 16:33
Posts: 37
Hi
DefaultNodeExpanded:=false work fine but DefaultNodeExpanded:=true not.

This is my code :

if tmp_box.Enabled then tmp_memE.TreeList.DefaultNodeExpanded:=false

else tmp_memE.TreeList.DefaultNodeExpanded:=true;

tnp_memE.Refresh;


Top
 Profile  
 
PostPosted: 06 Apr 2021, 14:15 
Offline

Joined: 08 May 2014, 18:06
Posts: 660
Hello

Please, check result in <EhLib Archive>\Demos\DBGridEh.TreeView\Project1.dpr project.

Code:
procedure TForm1.Button2Click(Sender: TObject);
begin
  if (DBCheckBoxEh1.Checked)
    then MemTableEh1.TreeList.DefaultNodeExpanded := True
    else MemTableEh1.TreeList.DefaultNodeExpanded := False;

  MemTableEh1.Refresh;
end;


I tested it. I works as for DefaultNodeExpanded := True as for DefaultNodeExpanded := False.

_________________
Best regards
EhLib Support Team


Top
 Profile  
 
PostPosted: 07 Apr 2021, 07:28 
Offline

Joined: 15 Mar 2021, 16:33
Posts: 37
This one wrok (MemTableEh1.TreeList.DefaultNodeExpanded := False)

the expand not work (MemTableEh1.TreeList.DefaultNodeExpanded := True)

Pls your advice


Top
 Profile  
 
PostPosted: 09 Apr 2021, 09:02 
Offline

Joined: 08 May 2014, 18:06
Posts: 660
Hello

Can you use TreeList.FullExpand and TreeList.FullCollapse code instead of DefaultNodeExpanded?

Like this:

Code:
  if (DBCheckBoxEh1.Checked)
    then MemTableEh1.TreeList.FullExpand
    else MemTableEh1.TreeList.FullCollapse;

_________________
Best regards
EhLib Support Team


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group