Information générale
Catégorie:
Codage, syntaxe et commandes
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.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement