On 11/09/2013 09:24, Antonio Fortuny wrote:
Le 11/09/2013 07:51, Richard Mace a écrit :
procedure TfrmMain.tvMainChange(Sender: TObject; Node: TTreeNode);
begin
  ShowMessage('Node ' + IntToStr(Integer(Node.Data)));
change to:
ShowMessage('Node ' + IntToStr(*PtrInt***(Node.Data)));

Also unless you want the treeview to behave as if it were fully initialised with Data integer values of zero, you would need to add:


procedure TfrmMain.tvMainChange(Sender: TObject; Node: TTreeNode);
begin
  if Assigned(Node) then
    ShowMessage('Node ' + IntToStr(PtrInt(Node.Data)));



--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to