Hola ,con la ayuda de un amigo se ha resuelto el algoristmo para sincronizar ambos componentes aqui le muestro :
Código Delphi
[-]
procedure TForm1.SpeedButton4Click(Sender: TObject);
begin
if nodocursor<>root then
begin
nodocursor:=nodocursor.GetPrev;
while nodocursor.getPrevSibling<>nil do
nodocursor:=nodocursor.getPrevSibling;
if not odd(NodoCursor.Level) then
Label1.caption:='White Moves'
else
Label1.Caption:='Black Moves';
llena_listbox(nodoCursor); end;
end;
procedure TForm1.llena_listbox(n: TTreeNode);
var
n1: TTreeNode;
plyb:string;
begin
ListBox1.Clear;
nodoCursor := n;
n1 := n;
Repeat
ListBox1.Items.Add(n1.text);
n1 := n1.getNextSibling;
Until n1 = nil;
end;
procedure TForm1.ListBox1Click(Sender: TObject);
var
n3:Ttreenode;
begin
n3:=nodocursor.getnext;
if n3.Text<>'End' then begin
repeat
if ListBox1.Items[ListBox1.ItemIndex] = nodoCursor.Text then
break;
nodoCursor := nodoCursor.getNextSibling;
until nodoCursor = nil;
nodoCursor := nodoCursor.getFirstChild;
if not odd(NodoCursor.Level) then
Label1.caption:='White Moves'
else
Label1.Caption:='Black Moves';
llena_listbox(nodoCursor); end
end;