473,503 Members | 7,578 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

treeview and imagelist

Sam
Hi again...
I'm trying to assign icons to the root nodes of my treeview.

I've got an imagelist that contains 6 images.
I've assigned this imagelist to be the one of my treeview.
(I've used the properties manager for the above)

I assign an icon to a node as this:

tvRelations.Nodes(iCntr).ImageIndex = 0

where iCntr represents the index of my node.
Unfortunately no images is being displayed... What's wrong ?

Thx

Nov 21 '05 #1
1 1599
"Sam" <sa**************@voila.fr> schrieb:
I'm trying to assign icons to the root nodes of my treeview.

I've got an imagelist that contains 6 images.
I've assigned this imagelist to be the one of my treeview.
(I've used the properties manager for the above)

I assign an icon to a node as this:

tvRelations.Nodes(iCntr).ImageIndex = 0

where iCntr represents the index of my node.
Unfortunately no images is being displayed... What's wrong ?


If you are calling 'Application.EnableVisualStyles' in order to enable
Windows XP visual styles for your application, call 'Application.DoEvents'
directly after the call to 'EnableVisualStyles'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
10358
by: What-a-Tool | last post by:
Is possible to use the windows image list for icon display in my treeview control? Would appreciate it you could point me towards a code sample or Key phrase to use in a google search. Thanks...
1
16811
by: Anthony Boudouvas | last post by:
Hi to all, i have a treeview that i put some nodes in it with their repsective images. If i try to change the image and set it to some other ImageList index, nothing happens. The code i use...
3
356
by: frazer | last post by:
hi i have a set of bitmaps in an array. and i want to add it to a imagelist so that i can show those images in my treeview. imageList2.Images.Add (Image.FromHbitmap (picture.Bitmap)); //cant...
3
821
by: feel | last post by:
Goin' crazy with this recursive function ported from delphi... I send a string like DirA/ DirB /DirC but i get in the treeView each one in a new node.Cant get the child node....!! -DirA -DirB...
1
6655
by: paradox | last post by:
I want to have a TreeView that shows an image on some items, but not all. Basically, if a certain condition is true, a caution icon is placed next to the treeview item. The problem is that, by...
3
2573
by: Grant Schenck | last post by:
Hello, I'm going round and round on how to best handle images for a treeview control. These are all known at design time so there is no dynamic aspect. That said, I want to associate the...
1
6500
by: Tom | last post by:
Why in the heck does VB.NET want to set the SelectedImageIndex any time I set the ImageList for my treeview?!? Yes, I want to have images for the nodes, but I don't want an image to be displayed...
1
2246
by: Webster | last post by:
Hello, I created a User Control consisting of a TreeView and an ImageList. I've populated the ImageList with pictures (design-time using the Properties Window), and I've added some Nodes to the...
0
1394
by: Sarika | last post by:
Hi, I am a little confused about associating an image w/ the VB.NET TreeView Control. My specific requirement is that I want to associate an image w/ some specific nodes in the TreeView only. ...
1
2881
by: Jeffrey Walton | last post by:
Hi All, I have an array of 16x16 bitmaps (60 total). I've tried adding the array to the ImageList with the Add method, but the TreeView paints as if no BMP is present. The problem is the...
0
7070
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7267
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7316
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6976
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5566
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4993
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
1
729
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
372
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.