EhLib.Com
https://forum.ehlib.com/en/

DefaultNodeExpanded:=true not work
https://forum.ehlib.com/en/viewtopic.php?f=5&t=1083
Page 1 of 1

Author:  redsea71 [ 05 Apr 2021, 10:40 ]
Post subject:  DefaultNodeExpanded:=true not work

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;

Author:  EhLibSupport [ 06 Apr 2021, 14:15 ]
Post subject:  Re: DefaultNodeExpanded:=true not work

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.

Author:  redsea71 [ 07 Apr 2021, 07:28 ]
Post subject:  Re: DefaultNodeExpanded:=true not work

This one wrok (MemTableEh1.TreeList.DefaultNodeExpanded := False)

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

Pls your advice

Author:  EhLibSupport [ 09 Apr 2021, 09:02 ]
Post subject:  Re: DefaultNodeExpanded:=true not work

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;

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/