Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / July 2004

Tip: Looking for answers? Try searching our database.

Tree/ListView images - are they only from ImageLists?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Adam Hearn - 17 Jul 2004 23:25 GMT
I've got a base image for an item and some common adornments. The adornments
reflect the state of the item being shown in the list. Stuff like padlock
for locked, cogs for in-use and the like. I've got the code that dynamically
generates an appropriate image based on the state.

The problem is how do I make the Tree/ListView item use it? These seem only
to have ImageIndex properties? I've already got 4 images lists offering
small and large sizes for 256 colour and XP images - seems rather onerous!

Any advice gratefully received!
Herfried K. Wagner [MVP] - 18 Jul 2004 01:28 GMT
Adam,

* "Adam Hearn" <ahearn@nospam.com> scripsit:
> I've got a base image for an item and some common adornments. The adornments
> reflect the state of the item being shown in the list. Stuff like padlock
[quoted text clipped - 4 lines]
> to have ImageIndex properties? I've already got 4 images lists offering
> small and large sizes for 256 colour and XP images - seems rather onerous!

It seems that you will have to store all the images in one imagelist and
set the 'ImageIndex' according to the item's state.

Signature

Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
<URL:http://dotnet.mvps.org/dotnet/faqs/

Adam Hearn - 18 Jul 2004 11:54 GMT
Indeed that's the conclusion I had :( I realise that there's a resource
saving when using an ImageList object but it would have been good to
override an image for a particular entry!

> Adam,
>
[quoted text clipped - 10 lines]
> It seems that you will have to store all the images in one imagelist and
> set the 'ImageIndex' according to the item's state.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.