I am building a class (prg) that will create a toolbar with a pageframe in it. Each page will contain a treeview, to be populated from a table. Each page is a function such as sales, purchases, administration, etc. All treeview definitions are in the mentioned table.
My problem is with the imagelist control. According to Megafox 1002 things you wanted to know about extending VFP, by Atkins, Kramek and Schummer, one needs to bind the imagelist control thus (page 248 of the book): (this is done in the INIT event of the form) thisform.oTree.ImageList = this.oImageList.object In this manner, the imagelist control is assigned to the treeview Now, in my class, I have a top level form that instantiates a toolbar class that will put a pageframe in the toolbar, with a treeview in each page I instantiate the imagelist control in the init of the toolbar class (I understand that a toolbar is a special kind of form) However, when I try to bind this imagelist control to each treeview, I get the error described in the book: OLE Dispatch exception code from ListViewCtrl:ImageList must be initialized before it can be used. If I create the toolbar using the designer, placing a pageframe with all its treeviews and the imagelist in its init event, it all works perfectly. But I want to build a class that will create the toolbar on the fly, with as many pages on the pageframe as passed as a parameter to the class, building the treeviews accordingly and populating them from records in a special table. And there is where I get the error. Why does it work when designed visually and not when instantiated from a class ? I know that some of the authors of the book are in this list and would appreciate some help on this issue Thanks very much in advance Rafael Copquin --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- _______________________________________________ Post Messages to: [EMAIL PROTECTED] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

