Working with ImageList. Change the icon.

Posted on 2007-10-01
Last Modified: 2008-01-09

I'm working with NextGrid ( and i want to load a picture from an image list.
So :

If somevariable='F' then  

I've tried everything, even working with 2 imagelists but i could not display 2 images...
Please help.

Thanks in advance.
Question by:CodedK
    LVL 4

    Expert Comment

    I never try that component but reading the tutorial in Berg site. I think that if you have a Images column TNxImageColumn as the content is an integer, i suppose that you link the image list to the column (or the grid), and then, the only thing to do is put the index order of the icon in the image list as an integer in the corresponding cell.
    LVL 16

    Author Comment

    Hi Spk200ar.
    NextGrid is free and its one of the best components for Delphi.
    Give it a try and try what you have in mind.
    LVL 10

    Accepted Solution

    i am not familiar with NextGrid.  Try this

    If somevariable='F' then  
    NextGrid1.Cell[NxImageColumn1.Index, RowIndex].AsInteger:=0                                         //NxImageColumn1.Images.GetIcon(0,Woman)  
    NextGrid1.Cell[NxImageColumn1.Index, RowIndex].AsInteger:=1;

    LVL 16

    Author Comment

    Thank you very much dinilud :)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
    This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now