Never make mistake to ask for code. you may just Google for codes. you should better refer to

http://www.gtk.org/tutorial/x2037.html
http://www.inversereality.org/tutori...nkedlists.html
http://www.daniweb.com/techtalkforums/thread12036.html

Never ask these questions. Better Google it....