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 adding a
ImageList to the TreeView, the ImageIndex property of the items in the
TreeView defaults to 0. I could put a blank icon in the ImageList and
make it the 0 index image, however, this makes an ugly space.
Would I have to create my own treeview class (inheriting from it) and
override certain methods to do this?
If so, are there any articles that describe how to do such a thing? As
in, an article describing how to change the way a inherited control
(such as treeview) draws (if drawing is where something like this would
take place)?
It is my understanding that if I did override functions like that, that
I'd have to code all the functionality it has by default; unless there
is a specific function within the treeview class that deals with
drawing the imagelist icons.
As opposed to an article, are there any books that discuss this
advanced topic of modifying the way existings controls work? One other
thing I wanted to do was have a treeview that was also a listview; a
treeview with columns of information. Thank you. 1 6663
Check this article of mine. I think I did that with the state image list for
some icons (notice the picture): http://www.codeproject.com/vb/net/vb...tatechkbox.asp
For Multicolumn treeviews, it's VB6 code but it can help if you need to do
it yourself... http://www.vbaccelerator.com/home/VB...ol/article.asp
--
Carlos J. Quintero
MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster. http://www.mztools.com
"paradox" <de*@demiurgeinc.com> escribió en el mensaje
news:11*********************@c13g2000cwb.googlegro ups.com... 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 adding a ImageList to the TreeView, the ImageIndex property of the items in the TreeView defaults to 0. I could put a blank icon in the ImageList and make it the 0 index image, however, this makes an ugly space.
Would I have to create my own treeview class (inheriting from it) and override certain methods to do this?
If so, are there any articles that describe how to do such a thing? As in, an article describing how to change the way a inherited control (such as treeview) draws (if drawing is where something like this would take place)?
It is my understanding that if I did override functions like that, that I'd have to code all the functionality it has by default; unless there is a specific function within the treeview class that deals with drawing the imagelist icons.
As opposed to an article, are there any books that discuss this advanced topic of modifying the way existings controls work? One other thing I wanted to do was have a treeview that was also a listview; a treeview with columns of information. Thank you. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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...
|
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...
|
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...
|
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...
|
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...
| |
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...
|
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...
|
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.
...
|
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...
|
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,...
|
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...
| |
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...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
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,...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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...
| |