[Lazarus] TTreenode.data
Richard Mace
richard.mace at gmail.com
Wed Sep 11 14:24:08 CEST 2013
Thanks for the reply.
Can't it be type casted because both a pointer and integer are 4 bytes?
On 11 Sep 2013 10:46, "Graeme Geldenhuys" <graeme at geldenhuys.co.uk> wrote:
> On 2013-09-11 06:51, Richard Mace wrote:
> > Can anyone give me an example of adding and retrieving an integer value
> to
> > a TTreenode via it's data property please?
>
> The Data property holds a pointer value, so don't assign an Integer
> directly. Rather define a Record structure (or a Class) that holds the
> data you want (in your case an Integer field), then assign the pointer
> to the record structure to the Treenode.Data property.
>
> There is an example in the LCL documentation:
>
> http://lazarus-ccr.sourceforge.net/docs/lcl/comctrls/ttreenode.data.html
>
>
> Regards,
> Graeme
>
> --
> fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
> http://fpgui.sourceforge.net/
>
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20130911/96f2289b/attachment-0003.html>
More information about the Lazarus
mailing list