Message forum tree

Hi,

I have table with messages. The table has
MessageID, MessageSubject and MessageParID
fields. The field MessageParID represents the
parent of one category. Parent category has value
for MessageParID = 0.
I need to (lets say) present list of all message
IDs in a List or Memo component as message tree
(just like folder tree is presented on Windows
Explorer). If some message is child of some other
message, then infront of it's MessageID place
something like "-->". An example MessageID's tree
should be :

1
-->2
-->-->5
-->-->10
-->3
-->-->7
4
-->6

This mean : Message 1 has two children : messages
2 and 3. Message 2 has two childrens : message 5
and 10. Message 3 has one child : message 7.
Messages 1 and 4 are main parent messages.
Can somebody help me to create this (i think
recursive) loop and present data.
Thanks Peter !

Sent via Deja.com
http://www.deja.com/