General information
Category:
Coding, syntax & commands
Hi Jordan.
this.imagelist = this.parent.olecontrol2
This should work just fine. Let me guess: this code is in the Init() of the TreeView and you are getting an error.
If this is the case, it is because the TreeView is getting instantiated before the ImageList. Just move the code to form's Init() (and change it appropriately). In the form's init, you can be sure that both controls have been instantiated.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only