Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Treeview and Imagelist question
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00155532
Message ID:
00155538
Vues:
17
>I have one Treeview and one ImageList controls on my form.
>Using ImageList properties tab I added into it two pictures 32*32.
>My problem is that TreeView ActiveX control doesn't recognise my ImageList control.
>In Form.Init event I have following code
>
>Local Node
>Node=ThisForm.TreeView.Nodes.Add(,,"Subscriber","Sidorov","subs")
>Node.Expanded = .T.
>ThisForm.TreeView.Nodes.Add("Subscriber",4,"A","Petrov")
>ThisForm.TreeView.Nodes.Add("Subscriber",4,"B","Ivanov")
>ThisForm.TreeView.Nodes.Add("Subscriber",4,"C","Baranov")
>
>When I run the form I got an error: ImageList must be initialized before it can be used.
>
>Please help to solve the problem.
>
>Igor Gelin, System Developer

Igor, add to your Treeview.Init()

this.Object.ImageList = this.parent.oleImageList.Object

(supposing your ImageList control has name "oleImageList")
(don't forget that ImageList control should be placed on the form before the TreeView.

Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform