Solved

Using ImageList, transparent icons look ungly

Posted on 2008-10-21
4
2,285 Views
Last Modified: 2013-11-23
Hi.

I have to use almost 20 icons depending on an event.
So i've used an ImageList to handle those icons (96x96) and load them to the Timage.
But the loaded icon looks ... well very ugly.
The code :

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
var
  b: TIcon;
begin
  b := TIcon.Create;
  If (condition) then .......ImageList1.GetIcon(5,b); .....  Image6.Picture.Assign(b);.......
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

I have set the drawing style to transparent, but no joy.
When i load to the TImage the icons one by one from a file, the result is fine.
But i want to hold those icons inside the executable.

Is there something wrong with the code?
Is there another ImageList component that handle icons better (free)?

Thanks in advance.
0
Comment
Question by:CodedK
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 15

Assisted Solution

by:mikelittlewood
mikelittlewood earned 250 total points
ID: 22765986
Try not using an imageList and use the .res (resource) file instead to store them, you should get better results.
0
 
LVL 15

Assisted Solution

by:mikelittlewood
mikelittlewood earned 250 total points
ID: 22766012
Take a look at this PAQ on using icons from a resource file

http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_20856460.html
0
 
LVL 16

Accepted Solution

by:
CodedK earned 0 total points
ID: 22766353
Hi mikelittlewood.

Thats the only logical solution besides using a nice component.
...But too much code-trouble for nothing.

I found "32 bit Image List v.1.0" by MCoP, and it works great :)
0
 
LVL 15

Expert Comment

by:mikelittlewood
ID: 22767582
Fair enough, glad you found a solution though :o)
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question