* * *

Author Topic: Imagelist not work  (Read 1635 times)

OnixJr

  • Guest
Imagelist not work
« on: July 06, 2005, 11:39:49 pm »
Hello, imagelist not work in lazarus for windows (0.9.6)... somebody can help-me?
The imagelist isn't loading images... I am loading images using resource files... and loading in execution time..... Thank You!
I'm from Brazil, excuse-me for bad english...

pepecito

  • Full Member
  • ***
  • Posts: 130
    • http://pepecito.zapto.org
Imagelist not work
« Reply #1 on: July 07, 2005, 12:10:08 pm »
I think that the following post is still valid today:
http://www.lazarus.freepascal.org/index.php?name=PNphpBB2&file=viewtopic&t=876&highlight=imagelist

The TImageList component is not working (actually), and there are people working on it.

As a workaround while waiting for a working version of the TimageList, you could create a vector of N Timage objects as many N images you need, and than use the index to refer to the -th image (TImage object) to extract its icon/bitmap or what other property you need.

Hope this help.
:: Home Page ::

noveo

  • Guest
Imagelist not work
« Reply #2 on: September 09, 2005, 09:57:11 am »
Sry, can you explain more exactly how use this TImage, please?. I want make a folders browser an I have this funciton:

Code: [Select]

procedure ShowFolders(Path:String);
var
   Result:TSearchRec;
   fldItem:TListItem;
begin
     frmBrowser.ListView1.Items.Clear;

     If FindFirst(Path + '\*',faDirectory, Result) = 0 then begin
        Try
           Repeat
                 fldItem := frmBrowser.ListView1.Items.Add;
                 fldItem.Caption:=Result.Name;
                 fldItem.ImageIndex:=???? <<< if I use a TImageList not run ok.

                 
           Until FindNext(Result) <> 0;
        Except
              FindClose(Result);
              Raise;
        End;
        FindClose(Result);
     End;
     
     fldImage.Free;
end;


Which is the best way??

Thx a lot!!

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads