[Lazarus] TTreenode.data
Howard Page-Clark
hdpc at talktalk.net
Wed Sep 11 10:41:08 CEST 2013
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)));
More information about the Lazarus
mailing list